我是C#的新手。我刚刚使用Visual Studio运行了C#“ Hello World”程序。
是否可以在不使用Visual Studio的情况下运行或编译C#程序?
如果可能的话,我应该使用哪个编译器?
谢谢
如果您安装了.NET v4(因此,如果您有较新的Windows或应用了Windows更新)
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe somefile.cs
或者
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe nomefile.sln
或者
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe nomefile.csproj
如果您安装了.NET,则很有可能已设置了%FrameworkDir%
变量,因此:
%FrameworkDir%\v4.0.30319\csc.exe ...
%FrameworkDir%\v4.0.30319\msbuild.exe ...
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句