Welcome to MSDN Blogs Sign in | Join | Help

Wriju's BLOG

.NET and everything
How to find public key token for a .NET DLL or assembly

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?”. 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,

Use the following command,

sn –T myDLL.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:\WINNT\Microsoft.NET\Framework\v3.5>sn -T EdmGen.exe

Microsoft (R) .NET Framework Strong Name Utility  Version 3.5.21022.8

Copyright (c) Microsoft Corporation.  All rights reserved.

 

Public key token is b77a5c561934e089

Namoskar!!!

Posted: Tuesday, July 01, 2008 10:37 PM by wriju

Comments

bakabdel said:

That's not fonction with framwork 3.0

# May 11, 2009 10:58 PM

David said:

Thank you! Why doesn't the MSDN documentation make this obvious?

# June 25, 2009 10:45 AM

wriju said:

MSDN is Wiki now, so you can add your inputs there. Please feel free to add any document/notes for others.

# June 29, 2009 6:52 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker