I\'m compiling a solution with many projects inside using VS2013\'s MSBuild. I want the build to stop if one of the projects fails to compile and that the error code of msbu
I'm using StopOnFirstBuildError
https://marketplace.visualstudio.com/items?itemName=EinarEgilsson.StopOnFirstBuildError
It stops the build when the any project building fails. I'm using on 2015. The linked page says it works with Visual Studio 2012, 2013, 2015, 2017.
The official documentation says StopOnFirstFailure: If true, when one of the projects fails to build, no more projects will be built. Currently this is not supported when building in parallel (with multiple processors).
Can you try setting BuildInParallel=false
and see if that helps?
Edit: Found an old blog post that says this might be easy to do if you're building a single .sln with multiple projects http://blogs.msdn.com/b/manishagarwal/archive/2006/05/09/593392.aspx
If anyone is still looking for this feature in Visual Studio, there is a free extension called [VSColorOutput]
(here), which has an option to stop the build on first build error. Once you have installed the extension, the options is located at: Tools.Options.VSColorOutput.Build Actions.Stop Build On First Error