This documentation is archived and is not being maintained.

ClientBuildManager.PrecompileApplication Method ()

Precompiles an ASP.NET application.

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

public void PrecompileApplication ()
public void PrecompileApplication ()
public function PrecompileApplication ()
Not applicable.

ASP.NET supports three forms of precompilation. One form allows for the in-place precompilation of an ASP.NET application. In this form, the site is deployed to production and then precompiled, which eliminates the need to dynamically compile the site when it is first visited by a user. The first user of the site will not experience the delay normally encountered on a site that is dynamically compiled.

The two other forms of precompilation are used for deployment. In either form, a layout of the site is generated that can be deployed to a production computer. One of these forms includes the markup pages so some amount of updating can be performed on the compiled site. The other form does not contain the markup pages and therefore cannot be updated without recompiling the original site. No source code is deployed to the target environment in either of these forms of precompilation.

The application to precompile is defined through the ClientBuildManager constructor. The ClientBuildManagerParameter object of the ClientBuildManager constructor defines which of the three forms of precompilation to perform.

A developer can precompile a Web site with the aspnet_compiler command-line tool or by calling the PrecompileApplication method.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0