命令行下编译c#代码

"C:\Program Files (x86)\MSBuild\14.0\Bin\csc.exe" C:\Users\jay\Desktop\ces.cs /out:C:\Users\jay\Desktop\ces.dll
"C:\Program Files (x86)\MSBuild\14.0\Bin\csc.exe" C:\Users\jay\Desktop\ces.cs /out:C:\Users\jay\Desktop\ces.exe
C:\Windows\Microsoft.NET\Framework\v4.0.30319里面也有csc.exe程序
先cd 到C:\Windows\Microsoft.NET\Framework\v4.0.30319目录中
然后用csc /out:C:\Users\jay\Desktop\ces.exe C:\Users\jay\Desktop\ces.cs,把ces.cs编译为ces.exe或dll

你可能感兴趣的:(总结)