Examples (8)
Compile one or more C# files to a CIL executable
csc path/to/input_file1.cs path/to/input_file2.cs ...Specify the output filename
csc /out:path/to/file path/to/input_file.csCompile into a `.dll` library instead of an executable
csc /target:library path/to/input_file.csReference another assembly
csc /reference:path/to/library.dll path/to/input_file.csEmbed a resource
csc /resource:path/to/resource_file path/to/input_file.csAutomatically generate XML documentation
csc /doc:path/to/output.xml path/to/input_file.csSpecify an icon
csc /win32icon:path/to/icon.ico path/to/input_file.csStrongly-name the resulting assembly with a keyfile
csc /keyfile:path/to/keyfile path/to/input_file.csmade by @shridhargupta | data from tldr-pages