.net 编译器csc的用法大全

1. 配置环境变量:在path 变量中加上csc.exe的路径 例如:C:\WINNT\Microsoft.NET\Framework\v1.1.4322\

2.csc的用法:
编译 File.cs 以产生 File.exe:
csc File.cs
编译 File.cs 以产生 File.dll:
csc /target:library File.cs
编译 File.cs 并创建 My.exe:
csc /out:My.exe File.cs
通过使用优化和定义 DEBUG 符号,编译当前目录中所有的 C# 文件。输出为 File2.exe:
csc /define:DEBUG /optimize /out:File2.exe *.cs
编译当前目录中所有的 C# 文件,以产生 File2.dll 的调试版本。不显示任何徽标和警告:
csc /target:library /out:File2.dll /warn:0 /nologo /debug *.cs
将当前目录中所有的 C# 文件编译为 Something.xyz(一个 DLL):
csc /target:library /out:Something.xyz *.cs

posted on 2007-07-03 13:08  无意  阅读(2217)  评论(1编辑  收藏  举报

导航