Since I decided to port my Pome game to Windows Phone 8.1 platform (yes, I know it’s dead, don’t really care) I had to dig through Microsoft’s documentation on how to build, sign and deploy applications for the Windows Phone 8.1 platform.

Here are the steps to create a key and sign your already built .appx application with it.

Create a private key using MakeCert

> MakeCert /n "CN=<PUBLISHER>" /r /h 0 /eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /e 
<EXPIRATION_DATE> /sv <YOUR_KEY>.pvk <YOUR_KEY>.cer

Convert the private key to Personal Information Exchange (.pfx) using Pvk2Pfx

> Pvk2Pfx /pvk <YOUR_KEY>.pvk /pi <PASSWORD> /spc <YOUR_KEY>.cer /pfx <YOUR_KEY>.pfx

Install the key into the trusted certificates store

> Certutil -addStore TrustedPeople <YOUR_KEY>.cer

Sign the application using SignTool

> SignTool sign /fd SHA256 /a /f <YOUR_KEY>.pfx /p <PASSWORD> <APPLICATION_NAME>.appx