CompilerType Class
Represents the compiler settings used within the ASP.NET build environment to generate and compile source code from a virtual path. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
The CompilerType type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | CodeDomProviderType | Gets a Type for the configured CodeDomProvider implementation. |
![]() | CompilerParameters | Gets the settings and options used to compile source code into an assembly. |
| Name | Description | |
|---|---|---|
![]() | Equals | Determines whether the specified object represents the same code provider and compiler settings as the current instance of CompilerType. (Overrides Object::Equals(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 | Returns the hash code for this instance. (Overrides Object::GetHashCode().) |
![]() | 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.) |
Use the CodeCompilerType property of a BuildProvider implementation to examine the settings used to generate and compile source code from a virtual path for that build provider.
The ASP.NET build environment uses BuildProvider objects to generate source code for custom file types within the project. Classes derived from BuildProvider provide build details for source files, Web pages, resources, and other custom items. When the build provider requires a specific programming language, it overrides the CodeCompilerType property and calls the GetDefaultCompilerType method to return a CompilerType object for the supported programming language.
To set the CompilerType object within a build provider implementation, use the GetDefaultCompilerType method or the GetDefaultCompilerTypeForLanguage method.
The CodeDomProviderType property specifies the CodeDomProvider implementation used to generate and compile source code for a build provider. The CompilerParameters property defines the settings used to compile the source code into an assembly.
The following code example illustrates a simple build provider implementation, inheriting from the abstract BuildProvider base class. The build provider overrides the CodeCompilerType, GetGeneratedType, and GenerateCode members of the base class.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


