重要
就安装时间和运行时而言, win32dependencies:ExternalDependency 仅适用于使用 Microsoft 应用安装程序应用的安装。 如果使用任何其他机制(例如 PackageManager API、Powershell cmdlet 或 Microsoft Intune)或通过应用安装程序应用以外的任何其他机制安装包,则 忽略 win32dependencies:ExternalDependency 。
重要
就生成时而言,PackageWriter makeappx.exe或 AppxManifestReader 不会验证 win32dependencies:ExternalDependency。
指定未包含在 MSIX 中的外部依赖项,但将在应用安装过程中进行链式安装。 如果 OS 上尚未安装指定的外部依赖项最低版本,Microsoft应用安装程序应用将从外部存储库检索最低版本并安装依赖项。 Microsoft维护可以使用此方法安装的依赖项列表。 有关允许包的当前列表,请参阅 备注 部分。
元素层次结构
[<依赖项>]
<win32dependencies:ExternalDependency>
语法
<win32dependencies:ExternalDependency
Name = 'A string between 3 and 50 characters in length that consists of alpha-numeric characters, periods, and dashes only.'
Publisher = 'A string with a value between 1 and 8192 characters in length that fits the regular expression of a distinguished name.'
MinVersion = 'A version string in quad notation, ("Major.Minor.Build.Revision") where "Major" is not "0".'
Optional = 'A boolean value.' />
属性和元素
属性
| 属性 | 描述 | 数据类型 | 必填 | 默认值 |
|---|---|---|---|---|
| 名称 | 依赖项包名称。 有关允许的依赖项包的列表,请参阅下面的“备注”部分。 | 长度介于 3 到 50 个字符之间的字符串,仅包含字母数字字符、句点和短划线。 | 是的 | |
| Publisher | 依赖项包的发布者。 | 长度介于 1 到 8192 个字符之间的字符串,适合可分辨名称的正则表达式。 | 是的 | |
| MinVersion | 外部依赖项的最低版本。 如果操作系统已安装最低版本,则不会触发安装。 | 四元表示法中的版本字符串(Major.Minor.Build.Revision),其中 Major 不 0。 |
是的 | |
| 可选 | 在没有 Internet 连接的情况下执行安装并且此值为 true 时,安装将在不安装外部依赖项的情况下完成。 如果此值为 false,则没有 Internet 连接的安装将失败。 | 布尔值。 | 是的 |
子元素
没有。
父元素
| Parent 元素 | 描述 |
|---|---|
| 依赖项 | 声明包所依赖的其他包以完成其软件。 |
例子
<Package
xmlns:win32dependencies="http://schemas.microsoft.com/appx/manifest/externaldependencies"
IgnorableNamespaces="... win32dependencies">
<Dependencies>
<TargetDeviceFamily
Name="Windows.Universal"
MinVersion="11.0.0.0"
MaxVersionTested="12.0.0.0"/>
<uap4:MainPackageDependency
Name="MyApp"
Publisher="CN=DianCert, O=Contoso Corporation, C=US" />
<win32dependencies:ExternalDependency
Name="Microsoft.WebView2"
Publisher="CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
MinVersion="1.1.1.1"
Optional="true"/>
</Dependencies>
</Package>
言论
此功能要求在目标计算机上安装Microsoft应用安装程序版本 1.16.12651.0 或更高版本。 可以从应用商店
允许的外部依赖项
下表列出了 ExternalDependency 元素中当前允许的外部依赖项。
| 包 | 名称属性值 | Publisher 属性值 |
|---|---|---|
| Webview2 | “Microsoft.WebView2” | “CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US” |
要求
| 项目 | 价值 |
|---|---|
| 虚拟化 | http://schemas.microsoft.com/appx/manifest/externaldependencies |