CompilerOptions Members
The CompilerOptions type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() |
Equals(System.Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() |
Finalize |
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() |
GetHashCode |
Serves as the default hash function. (Inherited from Object.) |
![]() |
GetType |
Gets the Type of the current instance. (Inherited from Object.) |
![]() |
MemberwiseClone |
Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() |
ToString |
Returns a string that represents the current object. (Inherited from Object.) |
Properties
Name | Description | |
---|---|---|
![]() |
AdditionalCompilerOptions |
Use the AdditionalCompilerOptions option to specify a custom compiler option.
More information:
for C# compiler
for VB.Net compiler
for JScript compiler
for F# compiler
|
![]() |
CSharpCompilerCustomOptions |
Custom options for C# compiler
|
![]() |
EmbeddedResourcesFilePath |
Embeds the specified resource into the output file.
|
![]() |
FSharpCompilerCustomOptions |
Custom options for F# compiler
|
![]() |
GenerateInMemory |
Gets or sets a value indicating whether to generate the output in memory.
true if the compiler should generate the output in memory; otherwise, false.
|
![]() |
IncludeDebugInformation |
The IncludeDebugInformation option causes the compiler to generate debugging information and place it in the output file or files.
|
![]() |
JScriptCompilerCustomOptions |
Custom options for JScript compiler
|
![]() |
LinkedResourcesFilePath |
Creates a link to a .NET Framework resource in the output file. The resource file is not added to the output file. This differs from the EmbeddedResourcesFilePath option which does embed a resource file in the output file.
|
![]() |
MainClassFullName |
This option specifies the class that contains the entry point to the program, if more than one class contains a Main method.
|
![]() |
OptimizeCode |
The OptimizeCode option enables or disables optimizations performed by the compiler to make your output file smaller, faster, and more efficient.
|
![]() |
OutputAssemblyIcon |
The OutputAssemblyIcon option inserts an .ico file in the output file, which gives the output file the desired appearance in the File Explorer.
|
![]() |
OutputAssemblyPath |
Specifies the output file name (default: base name of file with main class or first file).
|
![]() |
OutputAssemblyType |
The OutputAssemblyType compiler option can be specified in one of three forms:
ConsoleApplication: This option causes the compiler to create an executable (EXE), console application.
Library: This option causes the compiler to create a dynamic-link library (DLL) rather than an executable file (EXE).
WindowsProgram: This option causes the compiler to create an executable (EXE), Windows program.
|
![]() |
Platform |
Specifies which version of the common language runtime (CLR) can run the assembly.
The Platform compiler option can be specified in one of three forms:
X86: Compiles your assembly to be run by the 32-bit, x86-compatible common language runtime.
X64: Compiles your assembly to be run by the 64-bit common language runtime on a computer that supports the AMD64 or EM64T instruction set.
AnyCPU: (default) Compiles your assembly to run on any platform. Your application runs as a 64-bit process whenever possible and falls back to 32-bit when only that mode is available.
|
![]() |
ReferenceAssemblies |
The ReferenceAssemblies option causes the compiler to import public type information in the specified file into the current project, thus enabling you to reference metadata from the specified assembly files.
|
![]() |
SignKeyFilePath |
Specifies the filename containing the cryptographic key.
When this option is used, the compiler inserts the public key from the specified file into the assembly manifest and then signs the final assembly with the private key. To generate a key file, type sn -k file at the command line.
|
![]() |
TreatWarningsAsErrors |
The TreatWarningsAsErrors option treats all warnings as errors
|
![]() |
VBCompilerCustomOptions |
Custom options for Visual Basic .Net compiler
|
![]() |
WarningLevel |
The WarningLevel option specifies the warning level for the compiler to display.
0: Turns off emission of all warning messages.
1: Displays severe warning messages.
2: Displays level 1 warnings plus certain, less-severe warnings, such as warnings about hiding class members.
3: Displays level 2 warnings plus certain, less-severe warnings, such as warnings about expressions that always evaluate to true or false.
4: Displays all level 3 warnings plus informational warnings.
|
![]() |
Win32ManifestFilePath |
Use the Win32ManifestFilePath option to specify a user-defined Win32 application manifest file to be embedded into a project's portable executable (PE) file.
|
![]() |
Win32ResourceFilePath |
The Win32ResourceFilePath option inserts a Win32 resource in the output file.
|