Specifies a configuration file to include.
<assemblyBinding> Element for <configuration>
<linkedConfiguration href="URL of linked configuration file"/>
The following sections describe attributes, child elements, and parent elements.
|The URL of the configuration file that is to be included. The only format supported for the |
|<assemblyBinding> Element||Specifies assembly binding policy at the configuration level.|
<linkedConfiguration> element simplifies servicing for component assemblies. If one or more applications use an assembly that has a configuration file residing in a well-known location, the configuration files of the applications that use the assembly can use the
<linkedConfiguration> element to include the assembly configuration file, rather than including configuration information directly. When the component assembly is serviced, updating the common configuration file provides updated configuration information to all applications that use the assembly.
The following rules govern the use of linked configuration files.
The settings in included configuration files only affect loader binding policy and are used only by the loader. The included configuration files can have settings other than binding policies, but those settings do not have any effect.
The only format supported for the
hrefattribute is "file://". Local files and UNC files are supported.
There is no constraint on the number of linked configurations per configuration file.
All linked configuration files are merged to form one file, similar to the behavior of the
#includedirective in C/C++.
<linkedConfiguration>element is allowed only in application configuration files; it is ignored in Machine.config.
Circular references are detected and terminated. That is, if the
<linkedConfiguration>elements of a series of configuration files form a loop, the loop is detected and stopped.
The following code example shows how to include configuration file from the local hard disk.
<configuration> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <linkedConfiguration href="file://c:\Program Files\Contoso\sharedConfig.xml"/> </assemblyBinding> </configuration>