Export (0) Print
Expand All
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.

  NameDescription
Public methodClientBuildManager(String, String)Initializes a new instance of the ClientBuildManager class without a specified target directory or precompilation flags.
Public methodClientBuildManager(String, String, String)Initializes a new instance of the ClientBuildManager class with the specified target directory.
Public methodClientBuildManager(String, String, String, ClientBuildManagerParameter)Initializes a new instance of the ClientBuildManager class with the specified target directory and compilation parameter.
Public methodClientBuildManager(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
  NameDescription
Public propertyCodeGenDirGets the physical path to the directory used for code generation.
Public propertyIsHostCreatedGets a value that indicates whether an application domain for compiling ASP.NET Web applications has been created.
Top
  NameDescription
Public methodCompileApplicationDependenciesCompiles application-dependent files, such as files in the App_Code directory, the Global.asax file, resource files, and Web references.
Public methodCompileFile(String)Compiles the file represented by the virtual path.
Public methodCompileFile(String, ClientBuildManagerCallback)Compiles the file represented by the virtual path and provides a callback class to receive status information about the build.
Public methodCreateObjectCreates an object in the application domain of the ASP.NET runtime.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGenerateCodeGenerates code from the contents of a file.
Public methodGenerateCodeCompileUnit(String, Type, CompilerParameters, IDictionary)Returns the codeDOM tree, compiler type, and compiler parameters for a file represented by a virtual path.
Public methodGenerateCodeCompileUnit(String, String, Type, CompilerParameters, IDictionary)Returns the contents, codeDOM tree, compiler type, and compiler parameters for a file represented by a virtual path.
Public methodGetAppDomainShutdownDirectoriesGets the directories with files that, when changed, cause the application domain to shut down.
Public methodGetBrowserDefinitionsGets a collection of browser elements.
Public methodGetCodeDirectoryInformationGets 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 methodGetCompiledTypeCompiles the file represented by the virtual path and returns its compiled type.
Public methodGetCompilerParametersReturns the compiler type and parameters that are used to build a file represented by a virtual path.
Public methodGetGeneratedFileVirtualPathReturns the virtual path of a generated file.
Public methodGetGeneratedSourceFileGets the physical path to the generated file for a virtual path.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodGetTopLevelAssemblyReferencesReturns an array of the assemblies defined in the Bin directory and the <assembly> section of the Web configuration file.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetVirtualCodeDirectoriesReturns the virtual paths to the App_Code directory and its subdirectories in an ASP.NET application.
Public methodInitializeLifetimeServiceGives the application domain an infinite lifetime by preventing a lease from being created. (Overrides MarshalByRefObject.InitializeLifetimeService().)
Public methodIsCodeAssemblyIndicates whether an assembly is a code assembly.
Public methodPrecompileApplication()Precompiles an ASP.NET application.
Public methodPrecompileApplication(ClientBuildManagerCallback)Precompiles an ASP.NET application and provides a callback method to receive status information about the build.
Public methodPrecompileApplication(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 methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodUnloadUnloads the application domain for compiling ASP.NET Web applications.
Top
  NameDescription
Public eventAppDomainShutdownOccurs when an application domain is shut down.
Public eventAppDomainStartedOccurs when an application domain is started.
Public eventAppDomainUnloadedOccurs when an application domain is unloaded.
Top
  NameDescription
Explicit interface implemetationPrivate methodIDisposable.DisposeTerminates 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.

TopicLocation
How To: Secure an ASP.NET Application on a Shared ServerBuilding ASP .NET Web Applications
How To: Secure an ASP.NET Application on a Shared ServerBuilding ASP .NET Web Applications

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows Phone 8.1, Windows Phone 8, 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.

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)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.