c#命令编译解决方案和项目
C#调用命令行编译项目一般是用devenv和MSBuild 编译解决方案和项目。
具体用法如下:
devenv编译解决方案和项目
devenv C:\Users\Mr-Guo\Desktop\Solution1\Solution1.sln /Rebuild
devenv C:\Users\Mr-Guo\Desktop\Solution1\ConsoleApplication1\ConsoleApplication1.csproj /Rebuild
MSBuild 编译解决方案和项目
MSBuild C:\Users\Mr-Guo\Desktop\Solution1\Solution1.sln /t:Rebuild /p:Configuration=Release
MSBuild C:\Users\Mr-Guo\Desktop\Solution1\ConsoleApplication1\ConsoleApplication1.csproj /t:Rebuild /p:Configuration=Debug
devenv路径如下:D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\
msbuild路径如下:C:\Windows\Microsoft.NET\Framework\v4.0.30319