csc

The Microsoft C# Compiler. More information: <https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-options/command-line-building-with-csc-exe>.

Install

All systems
curl cmd.cat/csc.sh
Debian Debian
apt-get install chicken-bin
Ubuntu
apt-get install chicken-bin
Alpine
apk add chicken
Arch Arch Linux
pacman -S mono
image/svg+xml Kali Linux
apt-get install chicken-bin
Fedora
dnf install chicken
Windows (WSL2)
sudo apt-get update sudo apt-get install chicken-bin
OS X
brew install mono
Raspbian
apt-get install chicken-bin
Docker
docker run cmd.cat/csc csc powered by Commando

The Microsoft C# Compiler. More information: <https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-options/command-line-building-with-csc-exe>.

  • Compile one or more C# files to a CIL executable:
    csc path/to/input_file_a.cs path/to/input_file_b.cs
  • Specify the output filename:
    csc /out:path/to/filename path/to/input_file.cs
  • Compile into a `.dll` library instead of an executable:
    csc /target:library path/to/input_file.cs
  • Reference another assembly:
    csc /reference:path/to/library.dll path/to/input_file.cs
  • Embed a resource:
    csc /resource:path/to/resource_file path/to/input_file.cs
  • Automatically generate XML documentation:
    csc /doc:path/to/output.xml path/to/input_file.cs
  • Specify an icon:
    csc /win32icon:path/to/icon.ico path/to/input_file.cs
  • Strongly-name the resulting assembly with a keyfile:
    csc /keyfile:path/to/keyfile path/to/input_file.cs

© tl;dr; authors and contributors