C# Compiler Options Listed Alphabetically
Collapse the table of content
Expand the table of content

C# Compiler Options Listed Alphabetically


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




Reads a response file for more options.


Displays a usage message to stdout.


Names additional files that don't directly affect code generation but may be used by analyzers for producing errors or warnings.


Links the specified modules into this assembly


Run the analyzers from this assembly (Short form: /a)


Specifies the location of app.config at assembly binding time.


Specifies the base address for the library to be built.


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


Causes the compiler to generate overflow checks.


Specify the algorithm for calculating the source file checksum stored in PDB. Supported values are: SHA1 (default) or SHA256.


Specifies the codepage to use when opening source files.


Emits debugging information.


Defines conditional compilation symbols.


Delay-signs the assembly by using only the public part 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.


Specifies that high entropy ASLR is supported.


Enables incremental compilation [obsolete].


Specifies a strong name key container.


Specifies a strong name key file.


Specify language version mode: ISO-1, ISO-2, 3, 4, 5, 6, or Default


Specifies additional directories in which to search for references.


Makes COM type information in specified assemblies available to the project.


Links the specified resource to this assembly.


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


Specifies an assembly whose non-public types a .netmodule can access.


Specify the name of the source module


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


Instructs the compiler not to embed an application manifest in the executable file.


Enables/disables optimizations.


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


Specifies whether to use concurrent build (+).


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


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


Specifies the language to be used for compiler output.


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.


Specify a ruleset file that disables specific diagnostics.


Specifies the minimum version of the subsystem that the executable file can use.


Specifies the format of the output file by using one of four options:/target:appcontainerexe, /target:exe, /target:library, /target:module, /target:winexe, /target:winmdobj.


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 a custom win32 manifest file.


Specifies the win32 resource file (.res).

© 2016 Microsoft