Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Sideload UWP app via appxbundle without error

Tags:

I can successfully sideload an app on my secondary machine by running the PowerShell script generated with app package creation.

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:

...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. So in other words, the very first sideload install requires PowerShell, and subsequent updates can be done with the friendly GUI double-click approach.

My ultimate goal is to allow my users to install my app on a fresh machine, without having to get involved with PowerShell. So I need this GUI sideloading installation to work.

(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)

Update

My UWP project is set up to use an official, trusted code signing certificate (not a test certificate).

Update 2 It looks like this issue was resolved with the Fall Creator's Update. 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...". 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)

like image 779
BCA Avatar asked Oct 06 '17 17:10

BCA


1 Answers

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. Therefore all subsequent installs via double-click work as well.

Here is the relevant documentation from MSDN:

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

like image 139
Stefan Wick MSFT Avatar answered Oct 21 '22 01:10

Stefan Wick MSFT