Export (0) Print
Expand All

ClientBuildManager.PrecompileApplication Method (ClientBuildManagerCallback)

Precompiles an ASP.NET application and provides a callback method to receive status information about the build.

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

public void PrecompileApplication(
	ClientBuildManagerCallback callback
)

Parameters

callback
Type: System.Web.Compilation.ClientBuildManagerCallback

A ClientBuildManagerCallback containing the method to call when reporting the result of compilation.

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 callback parameter contains the method to call when reporting the result of compilation.

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.

.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