【发布时间】:2019-09-12 14:09:42
【问题描述】:
因此,我尝试使用 Windows 10 Creators Update 的 direct app install feature 来允许从 Web 下载打包的现代应用程序。它的关键特性是它会通过检查回 .appinstaller 文件的相同 URL 来自动更新您的应用程序。
https://new-file-explorer.firebaseapp.com/(页面完全由Visual Studio生成,我没有修改)
问题是当我点击它时,我只是得到“解析应用程序包时出错。”
如果我手动下载 .appinstaller 文件中引用的 .msixbundle,它将起作用!然而 App Installer 本身不能“解析”这个包?
这是最奇怪的部分:如果我使用 Powershell 中的“Add-AppxPackage -Appinstaller”并将其指向 .appinstaller URL,它将完全有效!
other answers on here 不适用,因为它们都与在本地服务器上运行它有关(我还是尝试过)。
我以为这与 MIME 类型有关,但我设置了 MIME 类型as stated in the documentation,但它仍然不起作用。我已经通过使用this URL MIME type checker 验证了这一点。我不知道究竟是什么原因造成的。
<?xml version="1.0" encoding="utf-8"?>
<AppInstaller Uri="https://new-file-explorer.firebaseapp.com/InstallNFE.appinstaller" Version="1.0.9.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2">
<MainBundle Name="NewFileExplorer" Version="1.0.9.0" Publisher="CN=david" Uri="https://new-file-explorer.firebaseapp.com/InstallNFE_1.0.9.0_Test/InstallNFE_1.0.9.0_x86_x64.msixbundle" />
<UpdateSettings>
<OnLaunch HoursBetweenUpdateChecks="0" />
</UpdateSettings>
</AppInstaller>
这是a link to the .msixbundle,它似乎无法解析(如您所见,它可以手动下载!)
【问题讨论】:
-
应用安装程序版本和操作系统构建版本是多少?请关注Troubleshoot installation issues with the App Installer file进行故障排除。
-
@XavierXie-MSFT 我确实遵循了这些说明。顺便说一句,一个问题是那个链接已经过时了,它没有提到 .msix 和 .msixbundle MIME 类型——只有旧的 appx。应用安装程序版本为 1.0.30732.0,操作系统版本为 Windows 10 1809。
-
我的同事和我花了很长时间试图重现您的问题。但是我们无法重现这个问题。您可以查看此测试web page。当您单击“安装示例应用程序”链接时,将打开应用程序安装程序,如果您单击“安装”,它将显示“证书”相关错误。这是正常的。因为你还没有在你的机器上安装证书。我们没有收到“解析应用程序包时出错”之类的错误。
-
所以,请创建一个新的空白 UWP 项目,并尝试告诉我们重现问题的完整步骤。
-
@XavierXie-MSFT 您是说从我的网站尝试时看不到问题,还是无法在自己的服务器上重现问题?有什么方法可以将我的完整 Visual Studio 项目发送给您吗?
标签: visual-studio uwp windows-10 firebase-hosting msix