This topic has not yet been rated - Rate this topic

ClientBuildManager Class

Provides compilation services for ASP.NET applications.

System.Object
  System.MarshalByRefObject
    System.Web.Compilation.ClientBuildManager

Namespace:  System.Web.Compilation
Assembly:  System.Web (in System.Web.dll)
[PermissionSetAttribute(SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Unrestricted = true)]
public sealed class ClientBuildManager : MarshalByRefObject, 
	IDisposable

The ClientBuildManager type exposes the following members.

  Name Description
Public method ClientBuildManager(String, String) Initializes a new instance of the ClientBuildManager class without a specified target directory or precompilation flags.
Public method ClientBuildManager(String, String, String) Initializes a new instance of the ClientBuildManager class with the specified target directory.
Public method ClientBuildManager(String, String, String, ClientBuildManagerParameter) Initializes a new instance of the ClientBuildManager class with the specified target directory and compilation parameter.
Public method ClientBuildManager(String, String, String, ClientBuildManagerParameter, TypeDescriptionProvider) Initializes a new instance of the ClientBuildManager class by using the specified virtual directory, source directory, target directory, compilation parameter, and type-description provider.
Top
  Name Description
Public property CodeGenDir Gets the physical path to the directory used for code generation.
Public property IsHostCreated Gets a value that indicates whether an application domain for compiling ASP.NET Web applications has been created.
Top
  Name Description
Public method CompileApplicationDependencies Compiles application-dependent files, such as files in the App_Code directory, the Global.asax file, resource files, and Web references.
Public method CompileFile(String) Compiles the file represented by the virtual path.
Public method CompileFile(String, ClientBuildManagerCallback) Compiles the file represented by the virtual path and provides a callback class to receive status information about the build.
Public method CreateObject Creates an object in the application domain of the ASP.NET runtime.
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GenerateCode Generates code from the contents of a file.
Public method GenerateCodeCompileUnit(String, Type, CompilerParameters, IDictionary) Returns the codeDOM tree, compiler type, and compiler parameters for a file represented by a virtual path.
Public method GenerateCodeCompileUnit(String, String, Type, CompilerParameters, IDictionary) Returns the contents, codeDOM tree, compiler type, and compiler parameters for a file represented by a virtual path.
Public method GetAppDomainShutdownDirectories Gets the directories with files that, when changed, cause the application domain to shut down.
Public method GetBrowserDefinitions Gets a collection of browser elements.
Public method GetCodeDirectoryInformation Gets information about the compiler type, compiler parameters, and the directory in which to store code files generated from non-code files such as .wsdl files.
Public method GetCompiledType Compiles the file represented by the virtual path and returns its compiled type.
Public method GetCompilerParameters Returns the compiler type and parameters that are used to build a file represented by a virtual path.
Public method GetGeneratedFileVirtualPath Returns the virtual path of a generated file.
Public method GetGeneratedSourceFile Gets the physical path to the generated file for a virtual path.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method GetTopLevelAssemblyReferences Returns an array of the assemblies defined in the Bin directory and the <assembly> section of the Web configuration file.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetVirtualCodeDirectories Returns the virtual paths to the App_Code directory and its subdirectories in an ASP.NET application.
Public method InitializeLifetimeService Gives the application domain an infinite lifetime by preventing a lease from being created. (Overrides MarshalByRefObject.InitializeLifetimeService().)
Public method IsCodeAssembly Indicates whether an assembly is a code assembly.
Protected method MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MemberwiseClone(Boolean) Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public method PrecompileApplication() Precompiles an ASP.NET application.
Public method PrecompileApplication(ClientBuildManagerCallback) Precompiles an ASP.NET application and provides a callback method to receive status information about the build.
Public method PrecompileApplication(ClientBuildManagerCallback, Boolean) Precompiles an ASP.NET application, provides a callback method to receive status information about the build, and indicates whether to create a clean build.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Unload Unloads the application domain for compiling ASP.NET Web applications.
Top
  Name Description
Public event AppDomainShutdown Occurs when an application domain is shut down.
Public event AppDomainStarted Occurs when an application domain is started.
Public event AppDomainUnloaded Occurs when an application domain is unloaded.
Top
  Name Description
Explicit interface implemetation Private method IDisposable.Dispose Terminates the current ASP.NET application.
Top

The ClientBuildManager class offers methods and properties for compiling ASP.NET Web applications, and retrieving the generated assemblies or generated source code. Instances of the class are established in the client's application domain and provide access to the ASP.NET build system outside of Microsoft Internet Information Services (IIS). The class can be used to develop customized tools for compiling Web applications.

The command-line tool aspnet_compiler uses the ClientBuildManager class.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ