A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
-bash/zsh: csc command not not found # Windows (WSL2) sudo apt-get update sudo apt-get install chicken-bin # Debian apt-get install chicken-bin # Ubuntu apt-get install chicken-bin # Alpine apk add chicken # Arch Linux pacman -S mono # Kali Linux apt-get install chicken-bin # Fedora dnf install chicken # OS X brew install mono # Raspbian apt-get install chicken-bin # Dockerfile dockerfile.run/csc # Docker docker run cmd.cat/csc csc
.NET Framework 项目的命令行参数:.NET Framework 项目使用 csc.exe
而不是 dotnet build 生成项目。 可以为 .NET Framework 项目指定 csc.exe 的命令行参数。
csc 将一个或多个 C# 文件编译为 CIL 可执行文件:
csc path/to/input_file_a.cs path/to/input_file_b.cs
csc 指定输出文件名:
csc /out:path/to/filename path/to/input_file.cs
csc 编译为 .dll 库而不是可执行文件:
csc /target:library path/to/input_file.cs
csc 引用另一个程序集:
csc /reference:path/to/library.dll path/to/input_file.cs
csc 嵌入资源:
csc /resource:path/to/resource_file path/to/input_file.cs
csc 自动生成XML文档:
csc /doc:path/to/output.xml path/to/input_file.cs
csc 指定图标:
csc /win32icon:path/to/icon.ico path/to/input_file.cs
csc 使用密钥文件对生成的程序集进行强命名:
csc /keyfile:path/to/keyfile path/to/input_file.cs