Question

I have a Visual Studio 2010 VSTO Outlook Add In project that was originally created in Visual Studio 2008. The VSTO dll project is signed with a VeriSign Certificate (Pfx file). When the project was created under VS 2008, there were no issues in building it on a new developer machine. Now, under VS 2010, we are getting the following build error:

"Cannot import the following key file: Blah.pfx. The key file may be password protected. To corrrect 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_blahblahblahblah"

For some time I was able to use sn.exe -i to manually install the certificate into the Strong Name CSP, as the error suggests, and all was fine. Now, I get the following cryptic error message when I try to use sn.exe -i to install the certificate:

"Failed to parse the PKCS#12 blob in blah.pfx -- An internal error occurred"

Does anyone know what causes this failure, and how to fix it? I've seen a couple of posts about setting permissions on the MachineKeys folder under Microsoft/Crypto/RSA, and I've tried that, but still get the same error message.

Was it helpful?

Solution

I ended up opening a Microsoft Premier Support incident for this problem, and it turned out that our Certificate had become corrupted. The solution was to replace it with a new Certificate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top