Ita*_*rBe 6 msbuild compilation visual-studio
我正在使用VS2013的MSBuild编译包含许多项目的解决方案。如果项目之一无法编译,并且希望msbuild的错误代码将为非零值,则表明构建失败,我希望构建停止。能做到吗
我正在运行以下命令开始编译:
%MS_BUILD_PATH%“%workarea%\ WindowsSolution.sln” / p:配置=发布/ p:ContinueOnError = false / p:StopOnFirstFailure = true
但它不能按我的意愿工作。有什么建议么?
官方文档说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).
您可以尝试设置一下BuildInParallel=false看看是否有帮助?
编辑:发现一篇旧博客文章说,如果您正在使用多个项目构建单个 .sln,这可能很容易做到http://blogs.msdn.com/b/manishagarwal/archive/2006/05/09/593392 .aspx