简体   繁体   English

如何通过appxbundle无错误地加载UWP应用程序

[英]How to Sideload UWP app via appxbundle without error

I can successfully sideload an app on my secondary machine by running the PowerShell script generated with app package creation. 我可以通过运行通过创建应用包创建的PowerShell脚本,在我的辅助计算机上成功地加载应用程序。

However, if I try the friendlier route of double-clicking on the .appx ( or .appxbundle ) file, and in that dialog press "Install", I get the following error: 但是,如果我尝试双击.appx (或.appxbundle )文件的更友好的路由,并在该对话框中按“安装”,我收到以下错误:

...installation failed

Ask the developer for a new app package. This package may conflict with a package already installed, or it depends on things that are not installed here (package dependencies) or is made for a different architecture (0x80073CF3).

But here's a twist: if I first install the app via the PowerShell script, subsequent app package updates do successfully install when going the double-click route. 但这是一个转折点:如果我首先通过PowerShell脚本安装应用程序,则在执行双击路由时,后续应用程序包更新成功安装。 So in other words, the very first sideload install requires PowerShell, and subsequent updates can be done with the friendly GUI double-click approach. 换句话说,第一个侧载安装需要PowerShell,后续更新可以使用友好的GUI双击方法完成。

My ultimate goal is to allow my users to install my app on a fresh machine, without having to get involved with PowerShell. 我的最终目标是允许我的用户在新机器上安装我的应用程序,而无需参与PowerShell。 So I need this GUI sideloading installation to work. 所以我需要这个GUI边加载安装才能工作。

(Note: I'm using VS 2017 15.3.4, both my development machine and target machine are running windows build 15063, and the issue is encountered even when creating a blank UWP app, targeting Creators Update 15063, and no other packages or references being added) (注意:我正在使用VS 2017 15.3.4,我的开发机器和目标机器都在运行Windows build 15063,即使在创建空白UWP应用程序时,也会遇到问题,目标是Creators Update 15063,没有其他软件包或参考资料被添加)

Update 更新

My UWP project is set up to use an official, trusted code signing certificate (not a test certificate). 我的UWP项目设置为使用官方的可信代码签名证书(而不是测试证书)。

Update 2 It looks like this issue was resolved with the Fall Creator's Update. 更新2看起来此问题已通过Fall Creator的更新解决。 After updating both my development machine and the target machine with the FCU, the installation dialog now indicates an additional step in the progress bar: around 19% it says "installing additional frameworks...". 在使用FCU更新我的开发机器和目标机器之后,安装对话框现在指示进度条中的另一个步骤:大约19%它表示“安装其他框架......”。 After that, it proceeds to "installing app package" and succeeds shortly thereafter. 之后,它继续“安装应用程序包”并在此后不久成功。

As an aside, my previous issue (targeting the older Creator's Update) was observed even with a blank app (VS -> Create new UWP app -> Sign with my trusted cert -> Create app package -> Attempt sideload) 顺便说一下,即使是空白的应用程序(VS - >创建新的UWP应用程序 - >使用我的可信证书签名 - >创建应用程序包 - >尝试侧载),我的上一期(针对较旧的创建者更新)也被观察到了

Your app package needs to be signed with a certificate that is trusted by the client computer for this to work. 您的应用包需要使用客户端计算机信任的证书进行签名才能使用。 This is an important part to ensure trustworthy deployment. 这是确保可靠部署的重要部分。 Otherwise the client could not be sure about the source of app package, opening the door for malware, adware or ransomware. 否则,客户端无法确定应用程序包的来源,为恶意软件,广告软件或勒索软件打开了大门。

The reason it works with the powershell script is because the script installs the test certificate that your package is signed with by Visual Studio. 它与powershell脚本一起使用的原因是因为脚本会安装Visual Studio对您的包进行签名的测试证书。 Therefore all subsequent installs via double-click work as well. 因此,所有后续安装都通过双击工作。

Here is the relevant documentation from MSDN: 以下是MSDN的相关文档:

https://docs.microsoft.com/en-us/windows/uwp/packaging/packaging-uwp-apps https://docs.microsoft.com/en-us/windows/uwp/packaging/packaging-uwp-apps

https://docs.microsoft.com/en-us/windows-hardware/drivers/install/installing-test-certificates https://docs.microsoft.com/en-us/windows-hardware/drivers/install/installing-test-certificates

It looks like this issue was resolved with the Fall Creator's Update. 看起来这个问题已经通过Fall Creator的更新解决了。 After updating both my development machine and the target machine with the FCU, the installation dialog now indicates an additional step in the progress bar: around 19% it says "installing additional frameworks...". 在使用FCU更新我的开发机器和目标机器之后,安装对话框现在指示进度条中的另一个步骤:大约19%它表示“安装其他框架......”。 After that it proceeds to "installing app package" and succeeds shortly thereafter. 之后,它继续“安装应用程序包”并在此后不久成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何认证 UWP.appxbundle? - How to certificate an UWP .appxbundle? 是否可以安装没有管理员权限的.appxbundle(UWP / XAML应用)? - Is it possible to install an .appxbundle (UWP/XAML app) without admin rights? 如何在不首先使用 .appinstaller 文件安装的情况下自动更新旁加载 UWP 应用程序 - How to auto-update a sideload UWP app without first installing with .appinstaller file 如何打包UWP app包含第三方dll到appxbundle? - how to package UWP app contains third-party dlls to appxbundle? 无法从应用包中侧载UWP应用 - Unable to sideload UWP app from app package 如何更新安装的 UWP.appxbundle with.appx - How to update installed UWP .appxbundle with .appx 无法将UWP App侧面加载到Windows Phone 10 - Unable to sideload UWP App to Windows phone 10 我可以在不使用 Add-AppDevPackage.ps1 的情况下构建一个依赖完整的 UWP 旁加载应用程序吗? - Can I build a UWP sideload app that is dependency-complete on installation without using Add-AppDevPackage.ps1? UWP 旁加载安装程序和通过 Web 分发的可信证书 - UWP sideload installer and distribution via web with trusted certificate .appxbundle 正在生成而不是 .appxupload - uwp - .appxbundle is generating instead of .appxupload - uwp
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM