繁体   English   中英

使用 MSBuild.exe 在发布模式下构建 C# 解决方案

[英]Building C# Solution in Release mode using MSBuild.exe

我能够使用 MSBuild.exe 构建解决方案,但我的问题是我只能设法让它在调试模式下构建。 我需要使用 MSBUILD 在发布模式下构建我的解决方案。

这是我尝试过的

Process msbuild = Process.Start("C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MsBuild.exe", solutionfilepath + " /P:Config=Release");

Process msbuild = Process.Start("C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MsBuild.exe", solutionfilepath + " /P:Configuration=Release");
MsBuild.exe [Path to your solution(*.sln)] /t:Build /p:Configuration=Release /p:TargetFrameworkVersion=v4.0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM