stop solution build on first compilation\link error - msbuild

前端 未结 3 1334
野的像风
野的像风 2021-01-18 05:17

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

相关标签:
3条回答
  • 2021-01-18 05:37

    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.

    0 讨论(0)
  • 2021-01-18 05:39

    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

    0 讨论(0)
  • 2021-01-18 05:44

    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

    0 讨论(0)
提交回复
热议问题