This documentation is archived and is not being maintained.

C# Compiler Options Listed Alphabetically 

The following compiler options are sorted alphabetically. For a categorical list, see C# Compiler Options Listed By Category.

Option Purpose


Reads a response file for more options.


Displays a usage message to stdout.


Links the specified modules into this assembly


Specifies the base address for the library to be built.


Creates a 'Bug Report' file. This file will be sent along with any crash information if used with /errorreport:prompt or /errorreport:send.


Causes the compiler to generate overflow checks.


Specifies the codepage to use when opening source files.


Emits debugging information.


Defines conditional compilation symbols.


Delay-signs the assembly using only the public portion of the strong name key.


Specifies an XML Documentation file to generate.


Specifies how to handle internal compiler errors: prompt, send, or none. The default is none.


Specifies the alignment used for output file sections.


Causes the compiler to generate fully qualified paths.


Displays a usage message to stdout.


Enables incremental compilation [obsolete].


Specifies a strong name key container.


Specifies a strong name key file.


Specifies language version modes: ISO-1 or Default.


Specify additional directories to search in for references.


Links the specified resource to this assembly.


Specifies the type that contains the entry point (ignore all other possible entry points).


Instructs the compiler not to auto include CSC.RSP file.


Suppresses compiler copyright message.


Instructs the compiler not to reference standard library (mscorlib.dll).


Disables specific warning messages


Enables/disables optimizations.


Specifies the output file name (default: base name of file with main class or first file).


Specifies the file name and location of the .pdb file.


Limits which platforms this code can run on: x86, Itanium, x64, or anycpu. The default is anycpu.


Includes all files in the current directory and subdirectories according to the wildcard specifications.


References metadata from the specified assembly files.


Embeds the specified resource.


Specifies the format of the output file using one of four options:/target:exe/target:library/target:module/target:winexe


Allows unsafe code.


Outputs compiler messages in UTF-8 encoding.


Sets the warning level (0-4).


Reports specific warnings as errors.


Uses this icon for the output.


Specifies the Win32 resource file (.res).