Groups | Blog | Home
all groups > dotnet faqs > october 2005 >

dotnet faqs : Strong Name Key (SNK) File


Tackie
10/21/2005 4:13:34 PM
1. After I use "sn -k MyKey1.snk" the snk file is created.
2. I then goto my solution and add an existing item.
3. Select the key file I just created
4. It is added to my solution
5. when I click it to edit the assembly data the file opens as a garbage
text file within .Net

I'm I missing something here? The key file when created also does not have
the "key/lock" icon in explorer.

Thanks for any help.

Scott M.
10/21/2005 5:55:25 PM
After you create the key file, you leave it where it is.
You then open the AssemblyInfo.vb/cs file and add the
AssemblyKeyFileAttribute.
Since this file is compiled into your project (AssemblyInfo.vb/cs), your
assembly will now have an association to the strong name in the .snk file.
The assembly could now be placed into the GAC if desired.


[quoted text, click to view]

Martin Robins
10/21/2005 9:45:21 PM
Strong name signing is acheived using the AssemblyKeyFile attribute; usually
in the AssemblyInfo.cs/vb source file. You do not simply add it to the
project.


[quoted text, click to view]

AddThis Social Bookmark Button