MSBuild build step runner indicates failure even though ContinueOnError is set to "True" at the point of "perceived" failure
TeamCity 9.1.5 (build 37377)
I created a new build configuration with an MSBuild build step runner which executes "build.proj" in the root of the checkout directory.
MSBuild version: Microsoft Build Tools 2013
MSBuild ToolsVersion: 12.0
Run platform: x86
Build.proj has several <MSBuild /> tasks in its default target, one of which has the ContinueOnError attribute set to "True".
<MSBuild Projects="Test.sln" ContinueOnError="True" />
Basically, building Test.sln is expected to fail.
When this build is run, TeamCity completes the build as expected, but indicates that the build failed because of the expected errors produced when building Test.sln.
For example,
I expected TeamCity to ignore the error and indicate that the build succeeded.
The reason the error is expected is due to a bug in MSBuild not respecting the build order defined defined in the solution, but is beyond the scope of this issue.
When using TFS Build in the same way, TFS Build indicates the build "partially succeeded".
Is this considered a bug/feature request in TeamCity?
Are there any work-arounds?
Thank you.
Please sign in to leave a comment.
Hello Rami,
Do you have "Fail build if: an error message is logged by build runner" checkbox enabled on Build Configuration > Failure Conditions page? Please see the comment in the related issue in tracker.