Many times we need to get the Public key token for a strongly named assembly in .NET. “how to get the public key token?”. Answer is very simple use the .NET Framework tools sn.exe. So open the Visual Studio 2008 Command Prompt and then point to the dll’s folder you want to get the public key,
I have used the
following command, for generating public key token for a SharePoint project
sn.exe –T SPExcercise1.dll
Public key token is d95388ccbe5ad4c1
This will give you the public key token.
Remember one thing this only works if the assembly has to be strongly signed.