Friday, October 03, 2014

VS 2010: The key file may be password protected error When Building

Symptom:

  1. You pulled a fresh project (i.e., the porject you never had on your machine) from a source control such as Git
  2. You build it on Visual Studi 2010 (or even may be later version) and you get the following type of error and cannot proceed.
  3. You know you have the .PFX file in your project.

Error 1 Cannot import the following key file: XYZZY42.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_07B0CF4FE777D718

Root Cuase:


It just simply cannot locate the cached password (I don't know where it stores it.)Fix

If you do know the password and the fix is easy. If you don't know it might as well create another new pfix file of your own.

Steps to Fix:


1. Go to the Property of the Project

2. On the left panel, click Signing

3. Under "Choose a strong name key file" pull it down and select Browse, and select the same key file as indicated. This will prompt you the password and you should be all set to go.



No comments: