Finding out the public key of a .net assembly

Ever been stuck trying to find the public token to put in your Web.Config? You can use the sn.exe signing tool to display the token. All you then want to do is uppercase the token to be consistent with what Visual Studio would write.

sn -Tp assembly.dll

This will display the public key and the public key token. The token is what you want for the Web.Config. With the token and the version and culture information you can see by looking at the properties of the assembly you have everything you need for the assemblies section.

Advertisements

One thought on “Finding out the public key of a .net assembly

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s