Sea*_*ken 16 msbuild parallel-processing visual-studio-2010
我有一个MSBuild命令行,可以构建一个完整的解决方案.它看起来像这样:
msbuild SomeSolution.sln/p:配置:CustomDebug; Platform = OurPlatform/nodeReuse:false/maxcpucount:4/t:Build
我知道对于C++解决方案,可以使用以下语法来定位特定项目:
msbuild SomeSolution.sln/p:配置:CustomDebug; Platform = OurPlatform/nodeReuse:false/maxcpucount:4 / t:Folder\SomeCppProject; Build
我正在尝试在解决方案中为.NET项目实现相同的功能.这不起作用:
msbuild SomeSolution.sln/p:配置:CustomDebug; Platform = OurPlatform/nodeReuse:false/maxcpucount:4 / t:SomeDotNetProject; Build
有没有人知道如何在.NET项目的命令行上使用MSBuild在解决方案中定位特定项目?我知道我可以创建一个自定义的MSBuild项目来实现我的目标,但我需要与Visual Studio共享解决方案和项目.
谢谢!
-Sean
Jer*_*Gee 39
您需要在Visual Studio解决方案文件中指定任何解决方案文件夹,并替换任何".".在项目名称中带"_":
msbuild SomeSolution.sln /p:Configuration:CustomDebug;Platform=OurPlatform /t:Folder\Project_Name
例如,如果解决方案文件夹"Deploy"中有一个名为"MyApplication.Deployment.csproj"的项目,则需要
msbuild SomeSolution.sln /p:Configuration:CustomDebug;Platform=OurPlatform /t:Deploy\MyApplication_Deployment
这是一个解决方案文件夹,如Visual Studio中显示的,而不是文件系统文件夹:忽略这些文件夹.
在项目文件而不是解决方案文件上调用 MSBuild(参考msbuild /?)
msbuild SomeDotNetProject\SomeDotNetProject.csproj /p:Configuration:CustomDebug;Platform=OurPlatform /nodeReuse:false /maxcpucount:4 /t:Build
| 归档时间: | 
 | 
| 查看次数: | 9602 次 | 
| 最近记录: |