Reputation: 51
When I am running the build from TFS server I got the following error: Cannot import the following key file: C:\TfsData\Build_work\fa450055\EXChecker 2015\signingKey.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_EFCA4C5B6DFD4B4F
Could anyone help out with that?
Upvotes: 3
Views: 4928
Reputation: 1
In my case, I did these steps and it worked successfully.
Upvotes: 0
Reputation: 51183
It seems that your TFS Build Service account has no required permission to access the signingKey.pfx on build agent machine. Make sure you have this file on build agent machine first.
Then follow below steps:
sn –i signingKey.pfx VS_KEY_EFCA4C5B6DFD4B4F
(Ensure that you use the key name appearing in the error message)When prompted for a password type the password for the pfx file
Then rebuild it
Note: If you are not running Visual Studio as an Administrator try doing that as well.
More details you can reference the answer from Brandon Manchester Cannot import the keyfile 'blah.pfx' - error 'The keyfile may be password protected'
Upvotes: 11