Most of the times we need public key token of DLL to use it in web.config. We can get the public key token using Visual Studio.
To get that, we need to follow below steps:
1) In Visual Studio, Go to Tools and then click on External Tools
2) New window will open, then click on Add and enter the details as below:
- Title: Get Public Key Token
- Command: It depends on where you installed SDK. In my case it is C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe
- Arguments: -Tp "$(TargetPath)"
- Also check the checkbox "Use Output Window" and uncheck other checkboxes
3) Click on OK button. Now the "Get Public Key Token" will be available in Tools:
4) So now we are ready to use this. After giving strong name to your assembly, you can click on "Get Public Key Token". You will get Public Key Token in output window.