Click or drag to resize

CompilationOptions Class



Represents compilation options common to C# and VB.
Inheritance Hierarchy

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public abstract class CompilationOptions

The CompilationOptions type exposes the following members.

Properties
  NameDescription
Public propertyAssemblyIdentityComparer
Used to compare assembly identities. May implement unification and portability policies specific to the target platform. Default if not specified.
Public propertyCheckOverflow
Whether bounds checking on integer arithmetic is enforced by default or not.
Public propertyConcurrentBuild
Specifies whether building compilation may use multiple threads.
Public propertyCryptoKeyContainer
The CSP container containing the key with which to sign the output.
Public propertyCryptoKeyFile
The name of the file containing the public and private keys to use to generate strong name of the compilation assembly and to sign it.
Public propertyCryptoPublicKey
Specifies public key used to generate strong name for the compilation assembly, or empty if not specified.
Public propertyDelaySign
Mark the compilation assembly as delay-signed.
Public propertyDeterministic
Specifies whether the compilation should be deterministic.
Public propertyErrors
Errors collection related to an incompatible set of compilation options
Protected propertyFeatures Obsolete.
A set of strings designating experimental compiler features that are to be enabled.
Public propertyGeneralDiagnosticOption
Global warning report option
Public propertyLanguage
Gets the source language ("C#" or "Visual Basic").
Public propertyMainTypeName
The full name of a type that declares static Main method. Must be a valid non-generic namespace-qualified name. Null if any static Main method is a candidate for an entry point.
Public propertyMetadataReferenceResolver
Resolves paths to metadata references specified in source via #r directives. Null if the compilation can't contain references to metadata other than those explicitly passed to its factory (such as #r directives in sources).
Public propertyModuleName
Name of the primary module, or null if a default name should be used.
Public propertyOptimizationLevel
Specifies whether or not optimizations should be performed on the output IL. This is independent of whether or not PDB information is generated.
Public propertyOutputKind
The kind of assembly generated when emitted.
Public propertyPlatform
Specifies which version of the common language runtime (CLR) can run the assembly.
Public propertyPublicSign
Mark the compilation assembly as fully signed, but only sign with the public key.
Public propertyReportSuppressedDiagnostics
Whether diagnostics suppressed in source, i.e. IsSuppressed is true, should be reported.
Public propertyScriptClassName
The full name of a global implicit class (script class). This class implicitly encapsulates top-level statements, type declarations, and member declarations. Could be a namespace qualified name.
Public propertySourceReferenceResolver
Gets the resolver for resolving source document references for the compilation. Null if the compilation is not allowed to contain source file references, such as #line pragmas and #load directives.
Public propertySpecificDiagnosticOptions
Warning report option for each warning.
Public propertyStrongNameProvider
Provides strong name and signature the source assembly. Null if assembly signing is not supported.
Public propertyWarningLevel
Global warning level (from 0 to 4).
Public propertyXmlReferenceResolver
Gets the resolver for resolving XML document references for the compilation. Null if the compilation is not allowed to contain XML file references, such as XML doc comment include tags and permission sets stored in an XML file.
Top
Methods
  NameDescription
Protected methodCommonWithAssemblyIdentityComparer
Protected methodCommonWithCheckOverflow
Protected methodCommonWithConcurrentBuild
Protected methodCommonWithCryptoKeyContainer
Protected methodCommonWithCryptoKeyFile
Protected methodCommonWithCryptoPublicKey
Protected methodCommonWithDelaySign
Protected methodCommonWithDeterministic
Protected methodCommonWithFeatures Obsolete.
Protected methodCommonWithGeneralDiagnosticOption
Protected methodCommonWithMainTypeName
Protected methodCommonWithMetadataReferenceResolver
Protected methodCommonWithModuleName
Protected methodCommonWithOptimizationLevel
Protected methodCommonWithOutputKind
Protected methodCommonWithPlatform
Protected methodCommonWithPublicSign
Protected methodCommonWithReportSuppressedDiagnostics
Protected methodCommonWithScriptClassName
Protected methodCommonWithSourceReferenceResolver
Protected methodCommonWithSpecificDiagnosticOptions(IEnumerableT)
Protected methodCommonWithSpecificDiagnosticOptions(ImmutableDictionaryString, ReportDiagnostic)
Protected methodCommonWithStrongNameProvider
Protected methodCommonWithXmlReferenceResolver
Public methodEquals
Protected methodEqualsHelper
Public methodGetHashCode
Protected methodGetHashCodeHelper
Public methodWithAssemblyIdentityComparer
Public methodWithConcurrentBuild
Creates a new options instance with the concurrent build property set accordingly.
Public methodWithCryptoKeyContainer
Public methodWithCryptoKeyFile
Public methodWithCryptoPublicKey
Public methodWithDelaySign
Public methodWithDeterministic
Creates a new options instance with the deterministic property set accordingly.
Public methodWithGeneralDiagnosticOption
Creates a new options instance with the specified general diagnostic option.
Public methodWithMainTypeName
Public methodWithMetadataReferenceResolver
Public methodWithModuleName
Public methodWithOptimizationLevel
Creates a new options instance with optimizations enabled or disabled.
Public methodWithOutputKind
Creates a new options instance with the specified output kind.
Public methodWithOverflowChecks
Public methodWithPlatform
Creates a new options instance with the specified platform.
Public methodWithPublicSign
Creates a new options instance with the specified public sign setting.
Public methodWithReportSuppressedDiagnostics
Creates a new options instance with the specified suppressed diagnostics reporting option.
Public methodWithScriptClassName
Public methodWithSourceReferenceResolver
Public methodWithSpecificDiagnosticOptions(IEnumerableT)
Public methodWithSpecificDiagnosticOptions(ImmutableDictionaryString, ReportDiagnostic)
Creates a new options instance with the specified diagnostic-specific options.
Public methodWithStrongNameProvider
Public methodWithXmlReferenceResolver
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Public operatorStatic memberInequality
Top
See Also