Many times we need to get the Public key token for a strongly named assembly in .NET. FAQ on that “how to get the public key token?”. The answer is straightforward 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,
Use the following command,
sn –T Test.dll
This will give you the public key token. Remember one thing this only works if the assembly has to be strongly signed.
Example
C:\Program Files\Microsoft Visual Studio 8\VC>sn -T C:\Test.dll
Microsoft (R) .NET Framework Strong Name Utility Version 2.0.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
the public-key token is 91b47bd693f571