Signing the Assembly ... SNK vs PFX

Add-in Express™ Support Service
That's what is more important than anything else

Signing the Assembly ... SNK vs PFX
What's the difference ? 
Robert Apostolico




Posts: 70
Joined: 2013-09-06
Not sure what the difference is, but what curious...

When you create a new Add-in-Express project, that process automatically creates a strong-name-key based on the original project/solution name specified, and happens to have the .snk file extension.

If you attempt to sign the assembly manually through the VS 2010/2013 IDE, it creates a "PFX" file.

What's the difference?
Is one method better than the other?

Coincidentally, I stumbled on this while trying to figure out where AppDomain.CurrentDomain.SetupInformation.ConfigurationFile was coming up with the wrong name for my dll.
It was using a "SIGBOP.snk" for signing the file.

I deleted that file, created a SigBOPbrowserIE.pfx file for the signing, and yet somehow, even though the output DLL is SigBOPbrowserIE.dll, .NET is trying to find/load a SigBOP.dll.config file.

Hopefully, we can get both of these oddities explained and ironed out.

THANK YOU!
BApostolico
Posted 27 May, 2014 13:43:58 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
Robert,

.SNK is about a strong name, .PFX is about a digital signature.

At http://msdn.microsoft.com/en-us/library/wd40t7ad%28v=vs.110%29.aspx, Microsoft say "A strong name consists of the assembly's identity its simple text name, version number, and culture information (if provided) plus a public key and a digital signature."

You use strong naming to ensure you (users) get exactly the DLL you (they) are expecting and not some other DLL that happens to have the same name. A digital signature confirms that your assembly is signed by you.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 May, 2014 02:07:03 Top
Robert Apostolico




Posts: 70
Joined: 2013-09-06
THANK YOU!
BApostolico
Posted 29 May, 2014 06:45:22 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
My pleasure!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 May, 2014 07:26:38 Top