MSIX 验证和故障排除MSIX Validation and Troubleshooting

尽管 MSIX 的安装成功率为 99%,但有时你需要能够排查安装问题。Though MSIX has a 99% successful install rate, sometimes you need to be able to trouble shoot an installation.

了解应用程序Know the application

了解你要安装的应用程序及其工作方式对于排查用户体验问题有很大的帮助。Understanding the application that you are installing and how it works can go a long way to troubleshooting the user experience. 例如,应用程序是否有某些可能会导致问题的限制?For example, does the application have certain limitations that could be causing the issues? 用户是否有权访问应用程序所需的资源?Does the user have access to the resources needed by the application? 应用程序是否存在当前操作系统未满足的依赖项?Were there dependencies the application had, that were not met by the current operating system?

测试应用程序Test your application

在部署应用程序之前,请确保你已测试了应用程序。Before deploying your application, make sure you have tested your application. Windows SDK 提供了一个可在发布之前查明常见问题的工具,即 Windows 应用认证工具包。The Windows SDK provides a tool, the Windows App Certification kit that can identify common issues before publication.
若要安装最新 Windows SDK,请转到此处To install the latest Windows SDK, go here. 若要详细了解 Windows 应用认证工具包,请参阅 Windows 应用认证工具包To learn more about the Windows App Certification Kit, see Windows App Certification Kit

对应用程序进行外部测试Flight your application

另一种在早期发现问题的好方法是对应用程序进行外部测试。Another great way to catch issues early is to flight your applications. 如果是通过 Windows 应用商店或适用于企业的 Microsoft Store 进行部署,则可以使用外部测试版来为部分个人部署你的应用程序以进行额外的真实环境测试。If you are deploying through the Windows store or Microsoft Store for Business, you can use package flights to deploy your application to a subset of individuals to get additional real world testing.
若要详细了解外部测试,请参阅程序包外部测试To learn more about flighting, see Package flighting.

设备门户和调试Device Portal and Debugging

有时候,必须在用户的环境中与应用程序进行交互,以便充分了解问题。Sometimes it is necessary to interact with the application in the user's environment to adequately understand the issue. Windows 提供了一个强大的工具(设备门户桌面),它允许你连接到设备并与应用程序进行远程交互。Windows provides a powerful tool, the Device Portal Desktop which will allow you to connect to the device and interact with the application remotely.
若要详细了解设备门户,请参阅设备门户桌面版To learn more about Device Portal, see Device Portal Desktop. 若要详细了解如何调试 MSIX 程序包,请参阅运行、调试和测试打包的桌面应用程序To learn more about Debugging MSIX packages, see Run, debug, and test a packaged desktop application.

安装问题Installation issues

当安装出现问题时,可以调查 AppInstaller 提供的项目。When there are issues with the installation, you can investigate the artifacts provided by AppInstaller. 首先,AppInstaller 提供了失败错误代码。First, AppInstaller provides error code failures. 如果任何失败的错误代码不足以确定错误所在,AppInstaller 还在事件查看器中记录了所有交互。If the error code for any failure is not sufficient to determine what is wrong, the AppInstaller also logs all interactions to the Event Viewer. 可以在以下位置找到日志:应用程序和服务日志->Microsoft->Windows->AppxDeployment-Server。You will find the logs here: Application and Services Logs->Microsoft->Windows->AppxDeployment-Server.

可以使用事件查看器或 Powershell 访问那些事件。You can use the Event Viewer or Powershell to access those events. 若要详细了解如何查看事件,请参阅对 Windows 应用的打包、部署和查询进行故障排除To learn more about how to view the events, see Troubleshooting packaging, deployment, and query of Windows apps.

若要详细了解 AppInstaller 故障排除,请参阅解决 Appinstaller 问题To learn more about AppInstaller troubleshooting, see Troubleshoot Appinstaller Issues.

后续步骤Next steps

有问题?Have questions? 请在 Stack Overflow 上向我们提问。Ask us on Stack Overflow. 我们的团队会监视这些标记Our team monitors these tags. 你还可以在此处提问。You can also ask us here.