Strong name and gacutil command in .Net
Strong Name is similar to GUID (It is supposed to be unique in space and time).
In COM components, Strong name is only needed when we need to deploy assembly in
GAC. Strong names help GAC to differentiate between two versions. Strong names
use public key cryptography (PKC) to ensure that no one can spoof it. PKC use
public key and private key concept. Following are the step to generate a strong
name and sign an assembly:
The Global Assembly Cache tool
allows you to view and manipulate the contents of the global assembly cache and
considered to be a development tool. Because of this it is only contained in the
.NET SDK but not in the regular redistributable. Visual Studio comes with the
SDK, so all Visual Studio users have it installed.
Using strong name and gacutil command:
Step1: Go to
“Microsoft Visual Studio 2010” >>Visual
Studio Tool>> Visual Studio Command prompt. This wills popup the command
prompt for you.
command prompt run the strong tool from there
Here k: the key specifies that we
want to generate the key.
key.snk: This file contains the
key that is generated by the sn tool
Note- Microsoft use symmetric algorithm, RSA2
Step3: Attached the key
public class show
Write above code on notepad and save it, where key.snk saved. Then make DLL like
Step4: Mapped DLL in Assembly folder
Write code on notepad and make EXE
file in different folder and access show.dll file
public class check
public static void
s = new show();