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


118

我可以使用MSBuild.exe构建解决方案,但是我的问题是我只能设法使其以DEBUG模式构建。我需要使用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时,可以在发布模式下构建解决方案吗?
2014年

Answers:


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.