Windows 8 Metro App: Error during App Packaging

If you are building a Metro app for Windows 8 and Visual Studio 2012 cannot create the application package due to invalid or expired certificate then here is what you need to do.

Double-click Package.appxmanifest file in Solution Explorer and go to the Packaging tab, click Choose Certificate.. then from the dropdown choose Create test certificate…

Screenshot (1)

Screenshot (2)

 

 

Enter the new certificate details, and click OK.

Screenshot (3)

You can now create your application package for distributions.