Export (0) Print
Expand All

BuildProvider.GetDefaultCompilerTypeForLanguage Method

Returns the compiler settings for the build provider based on the specified language.

Namespace:  System.Web.Compilation
Assembly:  System.Web (in System.Web.dll)

'Declaration
Protected Function GetDefaultCompilerTypeForLanguage ( _
	language As String _
) As CompilerType

Parameters

language
Type: System.String

A code language name.

Return Value

Type: System.Web.Compilation.CompilerType
A CompilerType that represents the compiler settings for the build provider based on the specified language. The base class returns the default compiler settings for the language based on the application configuration file.

ExceptionCondition
ArgumentNullException

language is Nothing.

HttpException

language does not match a configured compiler for the build provider.

Use the GetDefaultCompilerTypeForLanguage method to examine the compiler type configured in the build provider for a specific language name. Use the GetDefaultCompilerType method to examine the default compiler type for a build provider.

The base BuildProvider class determines the default compiler type using the Compiler elements in the Compilers property of the CompilationSection object for the configuration file. This is equivalent to examining the compiler elements in the system.web and the compiler elements in the system.codedom sections of the configuration file. For example, for the language value VB, the base class method returns a CompilerType object that corresponds to the configured settings for an instance of Microsoft.VisualBasic.VBCodeProvider.

When you derive from the BuildProvider class, you can use GetDefaultCompilerTypeForLanguage to set the CodeCompilerType property value for the language supported by your implementation.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft