Archived Forum Post

Index of archived forum posts


Extracting the PublicKeyBlob from a .NET Assembly (DLL)

Nov 14 '12 at 18:35

1) Open a command prompt and run sn.exe, which is typically found in Visual Studio’s SDK->BIN folder.

2) First extract the public key from the assembly using the following command:

sn -e ChilkatDotNet2.dll publicKey.snk

This extracts the public key (and public key blob) into a file.

3) To display the public key:

sn -tp publicKey.snk

When run on ChilkatDotNet2.dll, the following is output:

Microsoft (R) .NET Framework Strong Name Utility  Version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.

Public key is 0024000004800000940000000602000000240000525341310004000001000100b535d66df2c871 6055b05eb7f3d332451f89d5a293fc1f9b0244d4ec465fa04aeec12d5f9731296d95334b311d40 15c0567a5ce42475e1192e11798f8463b624fa6e655737207acafe2d68f67c2337bad527bf4d1f b44077845bf93260fc0ffcd0eb30fe7c7290463697f235b71979478bb33de14b9f73dbaa5402a2 767a1abe

Public key token is eb5fc1fc52ef09bd