buildProviders Element for compilation (ASP.NET Settings Schema) 

Defines a collection of build providers that are used to compile custom resource files.

   <add />
   <remove />

The following sections describe attributes, child elements, and parent elements.



Child Elements

Subtag Description


Optional element.

Adds a build provider to the collection.


Optional element.

Removes all references to inherited build providers, allowing only the build providers that are added by the current add element.


Optional element.

Removes a reference to an inherited build provider from the collection.

Parent Elements

Element Description


Specifies the root element in every configuration file that is used by the common language runtime and the .NET Framework applications.


Specifies the root element for the ASP.NET configuration section.


Configures all the compilation settings that ASP.NET uses to compile applications.

The buildProviders element defines a collection of build providers that are used to compile custom resource files of a particular file type and to generate code during compilation.

To define custom build actions for a file type within an ASP.NET application, you must derive a class from the BuildProvider class, implement members within the derived class for building the file type, and configure the build provider for the corresponding file extension within the application configuration file. For information, see BuildProvider.

The following default buildProviders element is not explicitly configured in the Machine.config file or in the root Web.config file. However, it is the default configuration that is returned by application. Items are added to the buildProviders collection in the root Web.config file.

   <clear />

The following default buildProviders element is configured in the root Web.config file.

   <add extension=".aspx" type="System.Web.Compilation.PageBuildProvider"/>
   <add extension=".ascx" type="System.Web.Compilation.UserControlBuildProvider"/>
   <add extension=".master" type="System.Web.Compilation.MasterPageBuildProvider"/>
   <add extension=".asix" type="System.Web.Compilation.ImageGeneratorBuildProvider"/>
   <add extension=".asmx" type="System.Web.Compilation.WebServiceBuildProvider"/>
   <add extension=".ashx" type="System.Web.Compilation.WebHandlerBuildProvider"/>
   <add extension=".soap" type="System.Web.Compilation.WebServiceBuildProvider"/>
   <add extension=".resx" type="System.Web.Compilation.ResXBuildProvider"/>
   <add extension=".resources" type="System.Web.Compilation.ResourcesBuildProvider"/>
   <add extension=".wsdl" type="System.Web.Compilation.WsdlBuildProvider"/>
   <add extension=".xsd" type="System.Web.Compilation.XsdBuildProvider"/>
   <add extension=".js" type="System.Web.Compilation.ForceCopyBuildProvider"/>

The following code example demonstrates how to define a build provider that is used to compile custom resource files with the specified extension.

               type="MyBuildProviderType, MyBuildProviderAssembly" />

Configuration section handler


Configuration member



Configurable locations


Root-level Web.config

Application-level Web.config

Virtual or physical directory–level Web.config


Microsoft Internet Information Services (IIS) 5.0, 5.1, or 6.0

The .NET Framework 2.0

Microsoft Visual Studio 2003 or Visual Studio 2005

Community Additions