<linkedConfiguration> Element


Specifies a configuration file to include.

<configuration> Element
<assemblyBinding> Element for <configuration>
<linkedConfiguration> Element

   href="URL of linked configuration file"/>  

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


hrefThe URL of the configuration file that is to be included. The only format supported for the href attribute is "file://". Local files and UNC files are supported.

Child Elements


Parent Elements

<assemblyBinding> ElementSpecifies assembly binding policy at the configuration level.

The <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.

System_CAPS_ICON_note.jpg Note

The <linkedConfiguration> element is not supported for applications with Windows side-by-side manifests.

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 href attribute 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 #include directive in C/C++.

  • The <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.

   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
      <linkedConfiguration href="file://c:\Program Files\Contoso\sharedConfig.xml"/>  

<assemblyBinding> Element
Configuration File Schema