Export (0) Print
Expand All

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
@ Specify a response file.
/? List compiler options to stdout.
/addmodule Specify one or more modules to be part of this assembly.
/baseaddress Specify the preferred base address at which to load a DLL.
/bugreport Create a file that contains information that makes it easy to report a bug.
/checked Specify whether integer arithmetic that overflows the bounds of the data type will cause an exception at run time.
/codepage Specify the code page to use for all source code files in the compilation.
/debug Emit debugging information.
/define Define preprocessor symbols.
/doc Process documentation comments to an XML file.
/filealign Specify the size of sections in the output file.
/fullpaths Specify the absolute path to the file in compiler output.
/help List compiler options to stdout.
/incremental Enable incremental compilation of source code files.
/lib Specify the location of assemblies referenced by means of /reference.
/linkresource Create a link to a managed resource.
/main Specify the location of the Main method.
/noconfig Do not compile with csc.rsp.
/nologo Suppress compiler banner information.
/nostdlib Do not import standard library (mscorlib.dll).
/nowarn Suppress the compiler's ability to generate specified warnings.
/optimize Enable/disable optimizations.
/out Specify output file.
/recurse Search subdirectories for source files to compile.
/reference Import metadata from a file that contains an assembly.
/resource Embed a .NET Framework resource into the output file.
/target Specify the format of the output file using one of four options:
/unsafe Compile code that uses the unsafe keyword.
/utf8output Display compiler output using UTF-8 encoding.
/warn Set warning level.
/warnaserror Promote warnings to errors.
/win32icon Insert an .ico file into the output file.
/win32res Insert a Win32 resource into the output file.

See Also

C# Compiler Options | C# Compiler Options Listed by Category | Building from the Command Line

© 2014 Microsoft