我可以使用MSBuild.exe构建解决方案,但我的问题是我只能在DEBUG模式下构建它。我需要使用MSBUILD在Release模式下构建我的解决方案。
以下是我尝试过的方法:
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");