<用於<配置>的程式集綁定>元素<assemblyBinding> element for <configuration>

指定位於組態層級的組件繫結原則。Specifies assembly binding policy at the configuration level.

  ** <配置>** 程式集綁定><<configuration>   <assemblyBinding>

語法Syntax

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <!-- Configuration files to include. -->
</assemblyBinding>

屬性Attribute

描述Description
xmlnsxmlns 必要屬性。Required attribute.

指定組件繫結所需的 XML 命名空間。Specifies the XML namespace required for assembly binding. 使用字串 "urn:schemas-microsoft-com:asm.v1" 做為值。Use the string "urn:schemas-microsoft-com:asm.v1" as the value.

父元素Parent element

描述Description
<配置><configuration> 通用語言執行平台和 .NET Framework 應用程式所使用之每個組態檔中的根項目。The root element in every configuration file used by the common language runtime and .NET Framework applications.

子項目Child element

描述Description
<連結配置><linkedConfiguration> 指定要包含的組態檔。Specifies a configuration file to include.

備註Remarks

** <連結配置>**元素允許應用程式佈建檔在已知位置包含程式集設定檔,而不是複製程式集配置設置,從而簡化了元件程式集的管理。The <linkedConfiguration> element simplifies the management of component assemblies by allowing application configuration files to include assembly configuration files in well-known locations, rather than duplicating assembly configuration settings.

注意

對於具有 Windows 並行清單的應用程式,不支援**<連結的配置>** 元素。The <linkedConfiguration> element is not supported for applications with Windows side-by-side manifests.

範例Example

下面的示例演示如何在本地硬碟上包含設定檔:The following example shows how to include a configuration file on the local hard disk:

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

另請參閱See also