Visual Studio requires the pfx key to be imported and the solution for importing the pfx key after the import is still required. studiopfx
This article is a personal blog backup article, the original address:
Http://validvoid.net/visual-studio-pfx-import/
Import key
When using Visual Studio to produce a project, projects that use the pfx Key signature may encounter the following problems:
You cannot import the following key file: *****. pfx. The key file may be password protected. To correct this problem, try importing the certificate again or manually installing the certificate to a CSP with the following key container Name: VS_KEY _****************
Cannot import the following key file :****. 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 _****************
In this case, you only need to follow the prompts to import the key. The specific operation steps are as follows:
After the import is complete, you can build the project normally in Visual Studio.
Re-import key
Sometimes, when Visual Studio requires an import key and performs the preceding import steps, the following error is returned:
Failed to install key pair -- Object already exists
In this case, you canVisual Studio Command Prompt
Run the following command to remove the imported key for re-import:
sn -d VS\_KEY\_\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
If you are prompted that the key is successfully deleted, you can use the preceding import procedure to re-import the key.
If the following error is returned when you delete the key:
Container does not exist
Container does not exist
This is because another account in the system has imported a key and cannot be removed from the current account. You can log on to the user account that previously imported the key to remove the key, and then switch to the account for project build to re-import the key.