Assembly generation failed Referenced assembly 8216xxx8217 does not have a strong name

I have a solution where projects are not signed, now I need to sign them, but clearly when I begin to insert signing I end with some errors like

Assembly generation failed Referenced assembly ‘xxx’ does not have a strong name

These errors are caused because your projects are referencing dll that are not strongly signed. For those dll that are open source you can simply recompile everything with a strong name, for those one that comes in compiled form only you need to disassemble and reassemble again with a strong name. To make everything simple I usually use this batch

1
2
3
4
call "%VS80COMNTOOLS%\vsvars32.bat"
ildasm /all /out=%1.il %1.dll
ilasm /dll /key=..\..\actvalue.snk %1.il
pause

you can invoke it passing the assembly file name as unique argument like

1
resign.bat somelibrary

This permits you to resign every assembly without the need of source code.

alk.

Tags: signing .NET Framework