我正在考虑启用:
我想知道如何在本地Visual Studio中进行构建,理论上如果它在本地并行构建就好了,我应该在VSTS中足够安全。
在ye'olden的日子里,使用msbuild命令行voodoo可以实现并行构建,根据我对复杂项目的经验,它似乎很少使用其他CPU内核。
但是在Visual Studio 2017中,它很简单,我现在有一个很好的绿地项目(欢乐时光):
我可以从Visual Studio的构建输出告诉我实际最终并行构建了多少个项目,让我对VSTS设置充满信心吗?
答案 0 :(得分:1)
当然,请参考以下步骤更改MSBuild输出详细程度(在屏幕截图的同一窗口中):
然后VS输出窗口中的构建日志将如下所示:
1>------ Rebuild All started: Project: MVCCore20, Configuration: Debug Any CPU ------
2>------ Rebuild All started: Project: ConsoleApp1, Configuration: Debug Any CPU ------
3>------ Rebuild All started: Project: ConsoleApp2, Configuration: Debug Any CPU ------
4>------ Rebuild All started: Project: ConsoleApp3, Configuration: Debug Any CPU ------
2>Target CoreClean:
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\bin\Debug\netcoreapp2.0\ConsoleApp1.deps.json".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\bin\Debug\netcoreapp2.0\ConsoleApp1.runtimeconfig.json".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\bin\Debug\netcoreapp2.0\ConsoleApp1.runtimeconfig.dev.json".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\bin\Debug\netcoreapp2.0\ConsoleApp1.dll".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\bin\Debug\netcoreapp2.0\ConsoleApp1.pdb".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\obj\Debug\netcoreapp2.0\ConsoleApp1.csprojResolveAssemblyReference.cache".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\obj\Debug\netcoreapp2.0\ConsoleApp1.csproj.CoreCompileInputs.cache".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\obj\Debug\netcoreapp2.0\ConsoleApp1.AssemblyInfoInputs.cache".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\obj\Debug\netcoreapp2.0\ConsoleApp1.AssemblyInfo.cs".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\obj\Debug\netcoreapp2.0\ConsoleApp1.dll".
2> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp1\obj\Debug\netcoreapp2.0\ConsoleApp1.pdb".
2>Target GenerateTargetFrameworkMonikerAttribute:
2> Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
4>Target CoreClean:
4> Deleting file "D:\1.0_Starain\1.0_Work\4.8_VSO\1.1_Projects\2017\MVCCore20\ConsoleApp3\bin\Debug\netcoreapp2.0\ConsoleApp3.deps.json".
2>Target CoreCompile:
数字1,2,3,4表示流程。
另一方面,如果在VSTS构建任务中选中并行构建选项,它会向MSBuild命令添加/m
参数,因此数字处理是每个处理器的数量在计算机上,如果要使用自定义值,则需要取消选中该选项并在 MSBuild Arguments 输入框中指定/m:X
参数。