.NET Framework - Assembly is required to be strongly named

Asked By Mr. X. on 22-May-12 03:44 AM
Hello,

I am creating a *.dll file on C#, and want to put it on "c:\windows\assembly
folder".
I got a message : "Assembly is required to be strongly named".

What should I declare on C#?

Thanks :)




Mr. X. replied to Mr. X. on 22-May-12 03:59 AM
(from C# VS 2008 - Is there something in the IDE environment?)
Thanks :)


Hello,

I am creating a *.dll file on C#, and want to put it on "c:\windows\assembly
folder".
I got a message : "Assembly is required to be strongly named".

What should I declare on C#?

Thanks :)
Peter Duniho replied to Mr. X. on 22-May-12 10:10 AM
First hit on Bing:
http://msdn.microsoft.com/en-us/library/wd40t7ad.aspx

Note link at bottom of page:
http://msdn.microsoft.com/en-us/library/xc31ft41.aspx
Arne Vajhøj replied to Mr. X. on 22-May-12 09:09 PM
Create a .snk file with:

sn -k MrX.snk

And add this you your code:

[assembly:AssemblyKeyFile("MrX.snk")]

Arne