OnFailure and VisualStudio 2005 errors log

Hi

1. From what I have checked If an action which is located under "Main" action list fails, it automatically run the "OnFailure" action list while if I run an action from action list which I have created it doesn't enter "OnFailure" .

Is there a way to make the connection or should I add try-catch ( or something else ) to all my action lists ?

2. I have several actions that run VS .net solutions and I want that if a solution fails it will send mail with ONLY the relevant Visual Studio projects which have failed in the solution build

So I have set the "Log to variable", Now what is the best way to extract only the output of projects which have failed and not the entire solution output ?

Hi EF,

Thanks for your post. Please find answers to your queries below:

1. No, the OnFailure list should run regardless of which action list fails. The only exception to this rule is the “Stop Run” action, which stops immediately and doesn’t do anything else. The alternative to this action is “Raise Exception”, which will continue normal error processing. If you’re not seeing the OnFailure list then this may be a bug - what version of FinalBuilder are you using?


2. Log To Variable is probably the best solution here.

Extracting individual project output is a bit more difficult. My only suggestion would be to use the MSBuild Project action to build each project individually, thereby giving you one action for each project. It might also be possible to split up the output by parsing the variable contents, but that would be fairly complex and prone to errors.

I can reveal that the next major version of FinalBuilder will have a “Visual Studio.NET Solution Iterator” action which will make this a lot easier, but unfortunately that won’t be available in the current version (and isn’t available yet, anyhow.)

Regards,

Angus

  1. I have version 5.5.0.627, is it a bug ?
    2. I can’t use one action per project for several reasons… so I will have to write a script that extract individual project output
    ( if someone has an example it would be nice )
    3. I want that if an action has failed Final Builder will run an error action like “Send Email” and then continue to the next action after the one that failed. How can I do that ?

    Thanks.

Hi E F,

1. It sounds like a bug. Would it be possible for you to please email us your project and log files (with a log showing the error) to support at finalbuilder.com? This will help expedite the process of locating and fixing the bug, if there is one. The behaviour is definitely correct in most cases.

2. I have an idea which will help you with this, but you'll have to bear with us (we're fairly busy at the moment.) It might not make it until a future major version, either (sorry.)

Good luck with the script - depending on what Visual Studio version you're using (And whether you use MSBuild) there should be some clear output strings which delimit each project building. If you're good with regular expressions you should be able to extract the project name and success/failure.

3. No, unfortunately this isn't really possible - you'll need to use Try...Catch around the action individually. A similar approach which might help would be to set the "Ignore Failure" option and export all "ignored failure" logs with the Export Log action, then send that in a single email (not quite the same, but a similar approach.)

Hi

1. I have sent a mail with an example
2. Ok thanks
3. You suggestion are not practical, Are there any plans to add this feature to your product ?

  1. Thanks for this. I sent you an email reply. I didn’t realise that you were using “Run Current Action List” in the IDE. At the moment this behaviour is intentional, although it is possible we could change it.

    3. It’s possible, although it would be a significant departure from our current behaviour.

    If you need to perform a series of similar events with fine-grained error handling, an alternative might be to use an iterator action. For example, in our build process we iterate over a list of components to build, loading details from an XML file for each component. You could use Try…Catch around parameterized actions like this, in order to get fine-grained error reports.

E F:

2) See my post in the thread linked below.  I think this might be what you're trying to do (but it's not a script).

https://www.finalbuilder.com/Default.aspx?tabid=53&forumid=1&tpage=1&view=topic&postid=6001#6015

3) I use Try/Catch just like Angus describes, I think to do just what you want.  I build several projects in my solution individually.  If a project build breaks, I send an email with the error log from that project, then move on to build the next project.  I use the Try/Catch blocks quite a bit, really helps with flow control if you don't want to end up in the OnFailure action list all the time.

Hope this helps.

-Mike