Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

codeSubDirectories Element for compilation (ASP.NET Settings Schema)

Defines an ordered collection of subdirectories that contains files to compile at run time.

This element is new in the .NET Framework version 2.0.


<codeSubDirectories>
   <add />
   <clear/>
   <remove /> 
/>

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

Element Description

add

Optional element.

Adds a subdirectory to the collection of subdirectories that contain files to compile at run time.

clear

Optional element.

Removes all references to inherited subdirectory names, allowing only the subdirectories that are added by the current add element.

remove

Optional element.

Removes a reference to an inherited subdirectory name from the collection.

Parent Elements

Element Description

configuration

Specifies the required root element in every configuration file that is used by the common language runtime and the .NET Framework applications.

system.web

Specifies the root element for the ASP.NET configuration section.

compilation

Configures all compilation settings that ASP.NET uses to compile applications.

The codeSubDirectories element defines an ordered collection of 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.

There is no default codeSubDirectories element configured for ASP.NET.

The following code example shows how to define an ordered collection of assembly subdirectories. The subdirectories are listed in the order that the code must be compiled that is function of your code dependencies.

<configuration>
   <system.web>
      <compilation>
         <codeSubDirectories>
           <add directoryName="mySubDir1"/>
           <add directoryName="mySubDir2"/>
           <add directoryName="mySubDir3"/>
         </codeSubDirectories>
      </compilation>
   </system.web>
</configuration>

Configuration section handler

CompilationSection

Configuration member

CodeSubDirectories

CodeSubDirectoriesCollection

Configurable locations

Machine.config

Root-level Web.config

Application-level Web.config

Virtual or physical directory–level Web.config

Requirements

Microsoft Internet Information Services (IIS) version 5.0, 5.1, or 6.0

The .NET Framework version 2.0

Microsoft Visual Studio 2003 or Visual Studio 2005

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.