更新:2007 年 11 月
RelatedProducts 元素定义了依赖于当前产品或包含在当前产品中的其他产品。
<RelatedProducts>
<DependsOnProduct
Code
>
<IncludesProduct
Code
>
</RelatedProducts>
元素和属性
RelatedProducts 元素是 Product 元素的子元素。它没有属性。
DependsOnProduct
DependsOnProduct 元素表明当前产品依赖于指定的产品,并且应在安装当前产品之前安装指定的产品。它是 RelatedProducts 元素的子元素。RelatedProducts 元素可能有一个或多个 DependsOnProduct 元素。
DependsOnProduct 具有下列属性。
属性 |
说明 |
---|---|
Code |
当前产品所依赖产品的代码名称,该名称由 Product 元素的 ProductCode 属性指定。有关更多信息,请参见 <Product> 元素(ClickOnce 引导程序)。 |
IncludesProduct
IncludesProduct 元素表明产品包含在当前安装中,不需要单独进行安装。它是 RelatedProducts 元素的子元素。RelatedProducts 元素可能有一个或多个 IncludesProduct 元素。
IncludesProduct 具有下列属性。
属性 |
说明 |
---|---|
Code |
包含的产品的代码名称,该名称由 Product 元素的 ProductCode 属性指定。有关更多信息,请参见 <Product> 元素(ClickOnce 引导程序)。 |
示例
下面的代码示例指定 Microsoft Installer 将随 .NET Framework 一起安装,因此不需要单独进行安装。
<RelatedProducts>
<IncludesProduct Code="Microsoft.Windows.Installer.2.0" />
</RelatedProducts>