Wednesday, November 28, 2012

Digital Signature pfx Blues and Fix

Update:  This does the same thing w/o having to use a visual studio extension/plug in.  http://www.slickit.ca/2010/09/fix-cannot-import-following-key-file.html

------------------------

Yes, it was machine migration time again. So I downloaded all my projects from team foundation server and went to debug...and...blam. Mycompany.pfx throws build errors. Now I know the password for the digital signature file (which is what the pfx files are) but I don't remember how they were setup. You can right click and install them, but there is a bunch of options that I'm not sure which of is correct. So I google, and I find this nifty little VS2010 extension-

http://visualstudiogallery.msdn.microsoft.com/d491911d-97f3-4cf6-87b0-6a2882120acf?SRC=Featured

I closed Visual Studio, downloaded and installed the extension, then restarted visual studio and opened my project that was giving me the pfx error.

Hit debug, build failed, right clicked the error in the error list window, and now there is an option called "Apply Fix." Right clicked it, a command window opened up asking me what the pfx password was, which I supplied, and got a confirmation that the pfx certificate was now installed.  Started up the project in debug, and everything worked!

Note, this utility only works for Visual Studio 2010 Pro version or above. There might be a 2008 version, and the 2010 version might work with Visual Studio 2012, but I haven't tried it yet.

More info on pfx issues here-

http://stackoverflow.com/questions/2815366/cannot-import-the-following-keyfile-blah-pfx-the-keyfile-may-be-password-prote

Note, it turns out this plugin isn't free.


Pro Application Lifecycle Management With Visual Studio By Rossberg, Joachim/ Olausson, Mathias (Google Affiliate Ad)

No comments: