Compartilhar via


<compilers> Element

Specifies the compilers that the ASP.NET application supports.

<configuration>
   <system.web>
      <compilation>
**         <compilers>**

<compilers>
   <compiler language="language"
             extension="ext"
             type=".NET Type" 
             warningLevel="number"  
             compilerOptions="options"/>
</compilers>

Subtag

Subtag Description
<compiler> Defines a new compiler option. Any number of <compiler> tags can be used in the <compilers> section.

Example

The following example configures compilation settings for an application.

<configuration>
   <system.web>
      <compilation defaultLanguage="VB"
         debug="true"
         numRecompilesBeforeAppRestart="15">
         
         <compilers>
            <compiler language="VB;VBScript"
               extension=".cls"
               type="Microsoft.VisualBasic.VBCodeProvider,system,     
                     Version=1.0.5000.0, Culture=neutral, 
                     PublicKeyToken=b77a5c561934e089"/>
            <compiler language="C#;Csharp"
               extension=".cs" 
               type="Microsoft.CSharp.CSharpCodeProvider,system, 
                     Version=1.0.5000.0,  Culture=neutral, 
                     PublicKeyToken=b77a5c561934e089"/>
         </compilers>

         <assemblies>
            <add assembly="ADODB"/>
            <add assembly="*"/>
         </assemblies>

      </compilation>
   </system.web>
</configuration>

Requirements

Contained Within: <system.web>

Web Platform: IIS 5.0, IIS 5.1, IIS 6.0

Configuration File: Machine.config, Web.config

Configuration Section Handler: System.Web.Configuration.CompilationConfigHandler

See Also

<compilation> Element | ASP.NET Configuration | ASP.NET Settings Schema