更新现有的 .MSIX 包以支持 .MSIX 核心Update your existing MSIX package to support MSIX Core

在将 .MSIX 包与.Msix Core一起部署之前,必须先更新 .msix 包清单。Before you can deploy your MSIX package with MSIX Core, you must first update your MSIX package manifest.

打包为 .MSIX 的应用必须与要在其中部署它们的操作系统兼容。Apps packaged as MSIX must be compatible with the operating system in which they are being deployed. .MSIX 包清单必须包含一个名称为MSIXCore的正确y和一个与操作系统内部版本号匹配的MinVersionThe MSIX package manifest must contain a proper TargetDeviceFamily with the name MSIXCore.Desktop and a MinVersion matching the operating system build number. 请确保同时包含相关的 Windows 10 版本1709和更高版本的条目,以便应用在本机支持 .MSIX 的操作系统上正确部署。Make sure to also include the relevant Windows 10, version 1709 and later entry as well so the app will deploy properly on operating systems that natively support MSIX.

下面的示例指定 Windows 7 SP1 作为最低版本:The following example specifies Windows 7 SP1 as a minimum version:

  <Dependencies>
    <TargetDeviceFamily Name="MSIXCore.Desktop" MinVersion="6.1.7601.0" MaxVersionTested="10.0.10240.0" />
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.16299.0" MaxVersionTested="10.0.18362.0" />
  </Dependencies>

所有MSIXCore应用都将部署到 Windows Server,并且具有具有相同内部版本号的基于桌面体验的操作系统。All MSIXCore.Desktop apps will deploy to Windows Server with Desktop Experience based operating systems with the same build number. 如果应用仅适用于服务器操作系统,请指定名为MSIXCoreyIf the app is intended only for a server operating system, specify a TargetDeviceFamily with the name MSIXCore.Server. 不支持部署到 Windows Server Core。Deployment to Windows Server Core is not supported.

使用 .MSIX 打包工具包编辑器更新清单Update Manifest using the MSIX Packaging Tool Package Editor

如果你有 .MSIX 包,则可以使用 .MSIX 包工具更新现有包,以支持 .MSIX Core,而无需重新打包。If you have an MSIX package, you can use the MSIX Package Tool to update your existing package to support MSIX Core without repackaging. 可以通过包编辑器两种方式执行此操作:You can do it two ways through the Package Editor:

  1. 打开 .Msix 打包工具应用Open MSIX Packaging Tool app
  2. 选择包编辑器Select Package editor
  3. 单击 "浏览 ... " 找到你的包Click on Browse... to locate your package
  4. 单击打开包Click Open package

[选项 1]使用复选框和下拉列表添加支持[Option 1] Use the checkbox and dropdown to add support

  1. 在 " .Msix Core 支持" 下,选中相应的复选框以将对 .msix Core 的支持添加到此包Under MSIX Core Support, select the checkbox to Add support for MSIX Core to this package
  2. 选择希望此包支持的 Windows 版本Select the Windows version you would like supported for this package

[选项 2]在清单文件中手动添加[Option 2] Manually add in the manifest file

  1. 在 "清单文件" 下,单击 "打开文件"Under Manifest file, click Open File
  2. 你正在查看包的清单。You are viewing the package's manifest. 在 "依赖项" 下,将 .msix Core 添加为目标设备系列(参见上文)Under Dependency add MSIX Core as a Target Device Family (see above)
  3. 保存并关闭清单Save and Close the manifest
  4. 对包进行重新签名Re-sign the package
  5. 单击 "保存" 并选择是否希望包递增Click Save and select whether you would like your package to increment

在转换过程中使用 .MSIX 打包工具添加 .MSIX 核心支持Add MSIX Core support using the MSIX Packaging Tool during conversion

从版本1.2020.402.0 开始,可以将 .MSIX Core 支持添加到用 .MSIX 打包工具生成的每个 .MSIX 包。Starting in version 1.2020.402.0, you can add MSIX Core support to each MSIX package that you generate with the MSIX Packaging Tool.

将 .MSIX Core 支持添加到所有 .MSIX 包Add MSIX Core support to all MSIX Packages

  1. 打开 .Msix 打包工具应用Open MSIX Packaging Tool app
  2. 选择右上方的齿轮以访问设置Select the gear in the top right to access the settings
  3. 在 "工具默认值" 下,选中相应的复选框,以在生成包时添加对 .msix Core 的支持。Under Tool Defaults select the checkbox to Add support for MSIX Core when generating a package.
  4. 选择默认情况下要支持的 Windows 版本Select the Windows version you would like support for by default
  5. 保存设置Save settings

在工作流过程中将 .MSIX Core 支持添加到单个包Add MSIX Core support to a single package during workflow

在现有安装程序的转换过程中,如果未将 .MSIX 核心支持指定为默认设置,则可以选择将其添加到所生成的包中。During conversion of an existing installer, you can choose to add MSIX Core support to the package you are generating, if you don't have it specified as a default setting. 还可以覆盖在设置中指定的默认设置。You can also overwrite the default setting that you have specified in your settings.

  1. 在 "转换包信息" 步骤中,选中相应的复选框以添加对此包的 .Msix Core 支持On the Package Information step of conversion, select the checkbox to Add support for MSIX Core to this package
  2. 选择希望此包支持的 Windows 版本Select the Windows version you would like supported for this package
  3. 继续执行转换过程Continue with your conversion process

.MSIX Core 支持的 Windows 版本Windows versions supported by MSIX Core

名称Name 版本Version
Windows 7,SP 1Windows 7, SP 1 6.1.7601.06.1.7601.0
Windows 8.1 (Update 1)Windows 8.1 (Update 1) 6.3.9600.06.3.9600.0
Windows 10 2015 LTSB (1507)Windows 10 2015 LTSB (1507) 10.0.10240.010.0.10240.0
Windows 10 2016 LTSB (1607)Windows 10 2016 LTSB (1607) 10.0.14393.010.0.14393.0
Windows Server 2008 R2Windows Server 2008 R2 6.1.7601.06.1.7601.0
Windows Server 2012Windows Server 2012 6.2.9200.06.2.9200.0
Windows Server 2012 R2Windows Server 2012 R2 6.3.9600.06.3.9600.0
Windows Server 2016Windows Server 2016 10.0.14393.010.0.14393.0