Monday 25 October 2010

Build Providers

Build Providers can be used by two entities in the development cycle, The build provider is first used is during te developemnt when you are building youe solution in VS 2010. For Instance when placing a CS file in App_Code folder IDE give you automatic the access to it's classes and their method instantly. 
The other entity that use the build provider is the ASP.NET itself, if you drag and drop a CS file in the App_Code folder of deployed application automatically gives the application access to the classes in the CS file.

A build provider is simply a class that inherits from System.Web.Compilation.BuildProvider
the <buildProviders> section in web.config file allows you to list the build providers classes that will be utilized.
<add extension=".wsdl" Type="System.web.Compilation.WsdlBuildProvider">

Using the Built-in Build Providers
The ForeceCopyBuildProvider is basically copies only those files for deployment that use the defined extensions, you can add other file types that you want to be part of this copy process. 
<add extension=".chm" Type="System.Web.Compilation.ForceCopyBuildProvider">

The IgnoreFileBuildProvider causes the defined files to be ignored form in the deployment or compilation process. 
<add extension=".vsd" Type="System.Web.Compilation.IgnoreFileBuildProvider">


1 comment: