C# Compiler (csc.exe)
The following table shows some of the common usages of the C# compiler:
Option |
Description |
---|---|
/a.keyfile:keyfilename |
|
/a.version:version |
This option enables versioning of assemblies. |
/debug |
With this option, the compiler will emit debugging information in the output file. |
|
This option is similar to C++. Use this option to define preprocessor symbols. |
/doc:docname |
|
/help |
This option shows the command-line help for the C# compiler. |
/main:classname |
If there is more than one Main entry in different classes, you will have to specify the Main entry in which class you want the entry point of the application. |
/out:filename |
This option represents the output filename. |
|
This option allows single or multiple libraries be included with this compilation. For multiple libraries to be included, use a semicolon as the delimiter. |
|
This option allows you to specify the type of the output:
|
/unsafe |
If you use unsafe keywords in your C# code, you will have to use this option when compiling your source. |
Get .Net Framework Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.