Switch branches/tags
version-2.10.0 version-2.9.0 version-2.8.2 version-2.8.0 version-2.7.0-beta3 version-2.6.0-beta3 version-2.4.0 version-2.3.5 version-2.3.4 version-2.3.2 version-2.3.2-beta1 version-2.3.0-beta3 version-2.3.0-beta2 version-2.3.0-beta1 version-2.2.0 version-2.1.0 version-2.0.0 version-2.0.0-rc4 version-2.0.0-rc3 version-2.0.0-rc2 version-2.0.0-rc version-2.0.0-beta5 version-2.0.0-beta4 version-2.0.0-beta3 version-2.0.0-beta1 version-1.3.2 version-1.3.1 version-1.3.0 version-1.3.0-beta1-20160429-01 version-1.2.2 version-1.2.1 version-1.2.0 version-1.2.0-beta1-20160108-01 version-1.2.0-beta version-1.2.0-beta-20151211-01 version-1.1.1 version-1.1.0 version-1.1.0-rc1-20151109-01 version-1.0.0 version-1.0.0-beta1-20141031-01 toolset_5 toolset_3 toolset_2 toolset_1_1 toolset_1 Visual.Studio.2015.Update.1.RC Visual.Studio.2015.Update.1.CTP Visual-Studio-2017 Visual-Studio-2017-Version-15.9 Visual-Studio-2017-Version-15.8 Visual-Studio-2017-Version-15.7.2 Visual-Studio-2017-Version-15.7 Visual-Studio-2017-Version-15.6 Visual-Studio-2017-Version-15.5 Visual-Studio-2017-Version-15.4 Visual-Studio-2017-Version-15.3.5 Visual-Studio-2017-Version-15.3.4 Visual-Studio-2017-Version-15.3.2 Visual-Studio-2017-Version-15.3 Visual-Studio-2017-Version-15.2 Visual-Studio-2017-Version-15.1 Visual-Studio-2017-RC4 Visual-Studio-2017-RC3 Visual-Studio-2017-RC2 Visual-Studio-2017-RC Visual-Studio-2017-Preview-Version-15.3 Visual-Studio-2017-Preview-6-Version-15.7 Visual-Studio-2017-Preview-3-Version-15.4 Visual-Studio-2017-Preview-3-Version-15.3 Visual-Studio-2017-Preview-2-Version-15.4 Visual-Studio-2017-Preview-2-Version-15.3 Visual-Studio-2017-Preview-1-Version-15.4 Visual-Studio-2015 Visual-Studio-2015-Update-3 Visual-Studio-2015-Update-3-Micro-Update-1 Visual-Studio-2015-Update-2 Visual-Studio-2015-Update-2-RC Visual-Studio-2015-Update-2-Micro-Update-3 Visual-Studio-2015-Update-2-Micro-Update-1 Visual-Studio-2015-Update-1 Visual-Studio-2015-Update-1-RC Visual-Studio-2015-Update-1-CTP Visual-Studio-2015-RC Visual-Studio-2015-Preview Visual-Studio-2015-CTP-6 Visual-Studio-2015-CTP-5 Visual-Studio-15-Preview Visual-Studio-15-Preview-5 Visual-Studio-15-Preview-4 Visual-Studio-15-Preview-3 VS.Toolset.Roslyn.1.1.0-beta1-20150727-01 VS.Tools.X86.Managed.V45.1.0.150513.2 Oss.Scan.2015.03.13 Oss.Scan.2013.03.13 NetFx.Toolset.150729
Nothing to show
Find file Copy path
472a7a1 Jul 7, 2017
4 contributors

Users who have contributed to this file

@jcouv @tmat @gafter @svick
86 lines (84 sloc) 6.54 KB

Visual C# Compiler Options

/out:file Specify output file name (default: base name of file with main class or first file)
/refout:file Specify the reference assembly's output file name
/target:exe Build a console executable (default) (Short form: /t:exe)
/target:winexe Build a Windows executable (Short form: /t:winexe )
/target:library Build a library (Short form: /t:library)
/target:module Build a module that can be added to another assembly (Short form: /t:module)
/target:appcontainerexe Build an Appcontainer executable (Short form: /t:appcontainerexe)
/target:winmdobj Build a Windows Runtime intermediate file that is consumed by WinMDExp (Short form: /t:winmdobj)
/doc:file XML Documentation file to generate
/platform:string Limit which platforms this code can run on: x86, Itanium, x64, arm, anycpu32bitpreferred, or anycpu. The default is anycpu.
/recurse:wildcard Include all files in the current directory and subdirectories according to the wildcard specifications
/reference:alias=file Reference metadata from the specified assembly file using the given alias (Short form: /r)
/reference:file list Reference metadata from the specified assembly files (Short form: /r)
/addmodule:file list Link the specified modules into this assembly
/link:file list Embed metadata from the specified interop assembly files (Short form: /l)
/analyzer:file list Run the analyzers from this assembly (Short form: /a)
/additionalfile:file list Additional files that don't directly affect code generation but may be used by analyzers for producing errors or warnings.
/win32res:file Specify a Win32 resource file (.res)
/win32icon:file Use this icon for the output
/win32manifest:file Specify a Win32 manifest file (.xml)
/nowin32manifest Do not include the default Win32 manifest
/resource:resinfo Embed the specified resource (Short form: /res)
/linkresource:resinfo Link the specified resource to this assembly (Short form: /linkres) Where the resinfo format is file{,string name{`,public
/debug{+|-} Emit (or do not Emit) debugging information
/debug:full Emit debugging information to .pdb file using default format for the current platform: Windows PDB on Windows, Portable PDB on other systems
/debug:pdbonly Same as /debug:full. For backward compatibility.
/debug:portable Emit debugging information to to .pdb file using cross-platform Portable PDB format
/debug:embedded Emit debugging information into the .dll/.exe itself (.pdb file is not produced) using Portable PDB format.
/sourcelink:file Source link info to embed into PDB.
/optimize{+|-} Enable optimizations (Short form: /o)
/deterministic Produce a deterministic assembly (including module version GUID and timestamp)
/refonly Produce a reference assembly, instead of a full assembly, as the primary output
/warnaserror{+|-} Report all warnings as errors
/warnaserror{+|-}:warn list Report specific warnings as errors
/warn:n Set warning level (0-4) (Short form: /w)
/nowarn:warn list Disable specific warning messages
/ruleset:file Specify a ruleset file that disables specific diagnostics.
/errorlog:file Specify a file to log all compiler and analyzer diagnostics.
/reportanalyzer Report additional analyzer information, such as execution time.
/checked{+|-} Generate overflow checks
/unsafe{+|-} Allow 'unsafe' code
/define:symbol list Define conditional compilation symbol(s) (Short form: /d)
/langversion:? Display the allowed values for language version
/langversion:string Specify language version such as default (latest major version), or latest (latest version, including minor versions)
/delaysign{+|-} Delay-sign the assembly using only the public portion of the strong name key
/keyfile:file Specify a strong name key file
/keycontainer:string Specify a strong name key container
/highentropyva{+|-} Enable high-entropy ASLR
@file Read response file for more options
/help Display a usage message (Short form: /?)
/nologo Suppress compiler copyright message
/noconfig Do not auto include CSC.RSP file
/parallel{+|-} Concurrent build.
/baseaddress:address Base address for the library to be built
/bugreport:file Create a 'Bug Report' file
/checksumalgorithm:alg Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 (default) or SHA256.
/codepage:n Specify the codepage to use when opening source files
/utf8output Output compiler messages in UTF-8 encoding
/main:type Specify the type that contains the entry point (ignore all other possible entry points) (Short form: /m)
/fullpaths Compiler generates fully qualified paths
/filealign:n Specify the alignment used for output file sections
/pathmap:k1=v1,k2=v2,... Specify a mapping for source path names output by the compiler.
/pdb:file Specify debug information file name (default: output file name with .pdb extension)
/errorendlocation Output line and column of the end location of each error
/preferreduilang Specify the preferred output language name.
/nostdlib{+|-} Do not reference standard library mscorlib.dll
/subsystemversion:string Specify subsystem version of this assembly
/lib:file list Specify additional directories to search in for references
/errorreport:string Specify how to handle internal compiler errors: prompt, send, queue, or none. The default is queue.
/appconfig:file Specify an application configuration file containing assembly binding settings
/moduleassemblyname:string Name of the assembly which this module will be a part of
/modulename:string Specify the name of the source module