Sunday, 13 November 2011

Concept of Strong name

strong name is used for unique id for.net assembly. it is used when we need to deploy assembly in Gac(global Assembly cache).

How to generate Strong name


go to visual studio tools> Visual studio Command Prompt

There is command prompt window With

C:\program files\visual studio 9.0\Vc\

to create strong name type sn.exe -k "c:\test.snk"


C:\program files\visual studio 9.0\Vc\sn.exe -k "c:\test.snk"

-k is key value parameter and "c:\test.snk" is location to save file


after that press enter nd u get

key pair return to "path"

For using strong Name in Class library


in Visual Studio
go to Projects > Class library1 properties. > signing

make use a key radio button Checked nd browse Location of test.snk

nd use test.snk in your Class Library

No comments:

Post a Comment