如何通过命令行批量构建.NET解决方案并获取项目构建统计?
Visual Studio解决方案命令行构建问题
我的Visual Studio解决方案包含40多个项目,每个项目有Debug/Release两种配置,以及Win32/x64/Any CPU三种平台,总计约200种配置组合。我已通过Visual Studio全选批量构建成功,输出为:
========== Build: 200 succeeded, 0 failed, 60 up-to-date, 16 skipped ==========
========== Build started at 7:01 PM and took 14:01.354 minutes ==========
尝试的构建方案
方案1
@echo off cls msbuild.exe "solutionpath\solutionfile.sln" pause
方案2
@echo off msbuild.exe "solutionpath\solutionfile.sln" /p:Configuration=Debug /p:Platform="Any CPU" msbuild.exe "solutionpath\solutionfile.sln" /p:Configuration=Debug /p:Platform="x64" msbuild.exe "solutionpath\solutionfile.sln" /p:Configuration=Debug /p:Platform="Win32" msbuild.exe "solutionpath\solutionfile.sln" /p:Configuration=Release /p:Platform="Any CPU" msbuild.exe "solutionpath\solutionfile.sln" /p:Configuration=Release /p:Platform="x64" msbuild.exe "solutionpath\solutionfile.sln" /p:Configuration=Release /p:Platform="Win32" pause
咨询问题
- 方案2是否覆盖了Visual Studio全选批量构建的所有配置与平台?
- 如何获取命令行构建的项目统计数据,以便与Visual Studio输出对比?
内容的提问来源于stack exchange,提问作者ChinnaR
相关产品推荐
相关产品推荐

