S h o r t S t o r i e s

// Tales from software development

How to check the signing of an assembly

leave a comment »

On the project that I’ve been assigned to for the past 20 months, we occassionally experience assembly signing issues during deployment. Somewhere, in the process of compiling several hundred assemblies and building ninety installers, something has gone wrong.

Surprisingly, even a lot of developers don’t seem to know how to quickly check the signing of an assembly. There are a number of 3rd party tools to do this. Alternatively, it’s not difficult to write a small test application to load an assembly into an AppDomain and inspect it to determine whether, and how, it is signed. However, you don’t really need to do this as the .NET signing tool (sn.exe) can be used to quickly indicate the signing state of an assembly:

sn -vf assembly-name

The signing tool will display one of the following messages:

For an unsigned assembly: assembly-name does not represent a strongly named assembly

For a signed assembly: Assembly ‘assembly-name‘ is valid

For a delay signed assembly: assembly-name is a delay-signed or test-signed assembly

Advertisements

Written by Sea Monkey

August 17, 2008 at 8:33 pm

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

%d bloggers like this: