Visual Studio automatically creates a Test Certificate when the project is created. But in moving the code around, especially to and from a repository you might need to create a new one. Also, the default certificate that Visual Studio generates expires one year after the date on which the certificate was created. Before the certificate expires, you must use the App Manifest Designer to either regenerate the certificate or to create a new one. Without this you can’t create an AppX package for app installation. Here’s how to create a Test Certificate.

 

  1. In Solution Explorer, open the  Appxmanifest  with the  App Manifest Designer.
  2. In the App Manifest Designer, choose the Packaging tab, and then choose the Choose Certificate button.
  3. In the Choose Certificate dialog box, expand the Configure Certificate list, and then choose Create test certificate.
  4. In the Create test certificate dialog box, click the OK button.

 

Note this is apart from the Code Signing certificate you create from the Project Property Pages.
Also, in creating an APPX package this (Test) Certificate must be intact or else the package creation will fail.