Monday, May 30, 2011

Sign a .Net assembly without the source code

Two different versions of an old .Net assembly caused some deployment problems. We wanted to deploy the assembly to the GAC but neither of the two versions were signed. We needed to sign the assemblies but we did not have the source code.

After a small search I found a great tool named ILMerge.
Main purpose of ILMerge is to combine more than one .Net assemblies into one assembly. The side benefit is that you can also sign the resulting assembly. It works while working with only one assembly too. This way you can sign an assembly without having the source code.
Sample command line:

ilmerge /t:library /keyfile:"c:\SomeKeyFile.snk" /out:"c:\signed\assembly.dll" "c:\unsigned\assembly.dll"

1 comment:

  1. It's useful info.Thanks for tips. ( it smells like a tip especially for me :) )