How to manually sign Windows 10 UAP apps for sideloading

Note: This article was written for Preview tooling that was released in March 2015.

With the current Visual Studio 2015 CTP6 with Windows 10 Tools Preview setup, Visual Studio will not automatically sign Windows 10 UAP apps for side loading (since this is a preview, these are expected). Since you cannot submit to the Store yet, you might want to share your apps with others, but after you create a package and try to sideload, you’ll get the “The package or bundle is not digitally signed or it’s signature is corrupted” error.

W10Sideload-1

To fix this, you need to manually sign your appx packages. Here are the steps:

  1. Create an appx package as usual from Project > Store > Create App Packages
  2. Copy the app temporary key from inside the VS project (i.e. App1_TemporaryKey.pfx) to the newly created test folder
  3. Open a command prompt and navigate to the test folder and type this (change package names and locations appropriately)

C:\Users\Sertac\Documents\Visual Studio 2015\Projects\PH10\App1\AppPackages\Product Hunt0.1.0.AnyCPUTest>“C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool.exe” sign /fd sha256 /f App1TemporaryKey.pfx “Product Hunt0.1.0.0AnyCPU.appx”

You’ll get this output:

W10Sideload-2

  1. Right click on the pfx file, and select Open. Navigate to the certificate, right click and select All Tasks > Export (there is probably a command line replacement for this but you only need to do this once. You can reuse the same certificate every time (although it needs to be copied to the test folder), you just need to do step 3 on every package.)

W10Sideload-3

  1. Follow the wizard to create a .CER file, and copy it to the folder where appx file is (test folder).
  2. You can now sideload as usual by running Add-AppDevPackage.ps1 with Powershell.

Let me know whether this worked for you, or if there is a better way in the comments section below.