To find the publickeytoken of an assembly, I use to drag and drop the assembly to C:\Windows\Assembly folder and then view the properties.
The better way is to use SN.EXE located under “C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin” folder.
You could integrate this tool into VS IDE using external tool features.
- In Visual Studio 2005, click Tools -> External Tools...
- Click Add and enter the following into the different fields as displayed in the following screenshot:
- Title: Get Public Key
- Command: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe
- Arguments: -Tp "$(TargetPath)"
- Uncheck all options, except Use Output window\
Now, you have a new entry listed in the Tools menu titled Get Public Key as shown in the following screenshot:
Assuming you have a project open that has been configured to be signed when built, and you've built it at least one time, selecting the new Get Public Key menu item from the Tools window to get the public key token and blob in the Output window.
Here you have assembly publictokenkey in second entry