CompilationSection Class
Configures compilation settings for ASP.NET applications.
Syntax
class CompilationSection : ConfigurationSectionWithCollection
Methods
The following table lists the methods exposed by the CompilationSection
class.
Name | Description |
---|---|
Add | (Inherited from ConfigurationSectionWithCollection.) |
Clear | (Inherited from ConfigurationSectionWithCollection .) |
Get | (Inherited from ConfigurationSectionWithCollection .) |
GetAllowDefinition | (Inherited from ConfigurationSection.) |
GetAllowLocation | (Inherited from ConfigurationSection .) |
Remove | (Inherited from ConfigurationSectionWithCollection .) |
RevertToParent | (Inherited from ConfigurationSection .) |
SetAllowDefinition | (Inherited from ConfigurationSection .) |
SetAllowLocation | (Inherited from ConfigurationSection .) |
Properties
The following table lists the properties exposed by the CompilationSection
class.
Name | Description |
---|---|
Assemblies |
An AssemblySettings value that contains assembly references that are used during compilation of an ASP.NET application. ASP.NET automatically links these assemblies to the resource when it compiles each code module. Note: This property is new in the .NET Framework 2.0. |
AssemblyPostProcessorType |
A read/write string value that specifies a post-process compilation step for an assembly. Note: This property is new in the .NET Framework 2.0. |
Batch |
A read/write boolean value. true if ASP.NET precompiles all the uncompiled files in batch mode; otherwise, false . The default is true .Set this attribute to true to change the delay caused by the required compilation when you access an uncompiled file. A delay occurs when the files are first compiled; however, after the files are compiled, the delay is eliminated. Note: This property is new in the .NET Framework 2.0. |
BatchTimeout |
A read/write datetime value that specifies the time, in seconds, granted for batch compilation to occur. The default is 900.If the compilation cannot be completed in the time-out period, the compiler reverts to single-compilation mode for the current page. Note: This property is new in the .NET Framework 2.0. |
BuildProviders |
A BuildProviderSettings value that compiles custom resource files of a particular file type and generates code during compilation. Note: This property is new in the .NET Framework 2.0. |
CodeSubdirectories |
A DirectorySettings value that specifies subdirectories that contain files to compile at run time. Subdirectory names are relative to the App_Code directory. The build order is inferred from the top-down order of the CodeSubDirectories collection. The App_Code directory is built last. However, there are no build order dependencies, which means that the build order is not significant. Note: This property is new in the .NET Framework 2.0. |
Debug |
A read/write boolean value. true if binaries that are created from compilation are debug binaries; false if release binaries are used for compilation. The default is false . Note: This property is new in the .NET Framework 2.0. |
DefaultLanguage |
A read/write string value that specifies the default programming language, such as C# or Visual Basic, to use in dynamic-compilation files. The default is "vb", which specifies Visual Basic.Language names are defined in the <system.codedom> section of the Machine.config file. Note: This property is new in the .NET Framework 2.0. |
Explicit |
A read/write boolean value. true if the Visual Basic explicit compile option is enabled; otherwise, false . The default is true . Note: This property is new in the .NET Framework 2.0. |
ExpressionBuilders |
An ExpressionBuilderSettings value that specifies resource strings to use during compilation. The resource strings associate prefixes with expression builders. Note: This property is new in the .NET Framework 2.0. |
Location |
(Inherited from ConfigurationSection .) A key property. |
MaxBatchGeneratedFileSize |
A read/write sint32 value that specifies the maximum combined size, in kilobytes, of the generated source files per batched compilation. The default is 1000. Note: This property is new in the .NET Framework 2.0. |
MaxBatchSize |
A read/write sint32 value that specifies the maximum number of pages that are compiled into a single batch. The default is 1000. Note: This property is new in the .NET Framework 2.0. |
NumRecompilesBeforeAppRestart |
A read/write sint32 value that specifies the number of dynamic recompiles of resources that can occur before the application restarts. The default is 15.This property is supported at the global and application configuration levels, but not at the directory configuration level. Note: This property is new in the .NET Framework 2.0. |
Path |
(Inherited from ConfigurationSection .) A key property. |
SectionInformation |
(Inherited from ConfigurationSection .) |
Strict |
A read/write boolean value. true if the Visual Basic strict compile option is used; otherwise, false . The default is false .When true , compilation explicitly disallows any data-type conversions in which data loss would occur, or any conversion between numeric types and strings. Note: This property is new in the .NET Framework 2.0. |
TempDirectory |
A read/write string value that specifies the directory to use for temporary file storage during compilation. The default is an empty string.If the string is empty and the current process identity has the required permissions to the %FrameworkInstallLocation%\ Temporary ASP.NET Files directory, that directory is used. If the string is empty and the current process identity does not have the required permissions to the Temporary ASP.NET Files directory, the system either throws an exception or writes to a directory to which it does have permissions, such as the Temp directory in the user profile. Note: This property is new in the .NET Framework 2.0. |
UrlLinePragmas |
A read/write boolean value. true if instructions to the compiler use URLs; false if instructions to the compiler use physical paths. The default is false . Note: This property is new in the .NET Framework 2.0. |
Subclasses
This class contains no subclasses.
Inheritance Hierarchy
ConfigurationSectionWithCollection
CompilationSection
Requirements
Type | Description |
---|---|
Client | - IIS 7.0 on Windows Vista - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
Server | - IIS 7.0 on Windows Server 2008 - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF file | WebAdministration.mof |
See Also
System.Web.Compilation.BuildProvider
System.Web.Configuration.CompilationSection
AssemblySettings Class
BuildProviderSettings Class
ConfigurationSectionWithCollection Class
DirectorySettings Class
ExpressionBuilderSettings Class
<system.codedom> Element