visual-studiovisual-studio-2013strongnamepfx

Signing assemblies with strong name using pfx and visual studio


So here is the problem: We have decided to buy a code signing certificate, we bought one from Godaddy which was in p12 format.

After researching I found out that p12 and pfx is the same thing with a different extension so I renamed it to pfx. I also got spc and p7c files but I don't have a clue what to do with them.

Anyway, I tried to add my certificate to my Visual Studio 2013 solution and here is what I get:

I tried to use the signtool which is what Goddady support recommends as an alternative but although it signs the assembly it does not provide strongnaming which I need.

I also tried to extract the certificate from the pfx to an snk using

    sn -p something.pfx key.snk

and selected delayed signing but the project didn't build again with even more errors.

Rhetorical question: why is this so hard? So many people have problems with this.

Can someone please help?


Solution

  • I have just encountered the same issue and this article saved my bacon!

    All I needed to do was recreate my Code Signing cert with KeySpec set to 2 (AT_SIGNATURE) and now VS (2013) imports and signs my assembly without error! :-D

    I realize that this is a bit different to your scenario, but I hope this can help in some way ...