Execute program + exit codes

I am using the "execute program" action to call MSBuild to compile my solution.  I cannot use the built-in MSBuild action for another unrelated issue.

I specify in the execute program action settings that "Program exit code must be equal to 0".  When I get a compile error, MSBuild returns exit code 1 according to the FB logs("Program returned code : 1").  However, the execute program action is still marked as a success instead of failing. 

Some additional setup in case its relevant: In the runtime tab, I am logging the program output to a variable.  I am also logging the error lines to a separate variable via an output monitor.  Would these affect whether FB can check the exit code?

I suppose I can check the length of the error variable from the output monitor after the execute program action runs to determine if there were any compile failures or not.  But I would rather the execute program action itself be marked as failed if the exit code != 0.

Any insight would be appreciated.

I made a small test project with an exe that returns code 1. It is the output monitor that is overriding the succeed/fail from the “program exit code must be equal to 0”.

My output monitor is using the save all matches to variable behavior. Is it by design that output monitor behavior overrides the program exit code check?

Hi Eric

I believe we fixed this since the last update, a change was made that accidentally changed the behavior. The fix was applied in build 1717 so please try this build :

https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1793.exe

Thanks, this build resolved the issue.