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

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

resign.bat somelibrary

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

alk.

Tags:



kick it on DotNetKicks.com

3 Responses to “Assembly generation failed Referenced assembly ‘xxx’ does not have a strong name”

  1. This might be a catch-all solution but it’s not always safe. You may be in violation of EULA/Licence Agreements. At the same time, you’re signing someone else’s binary and hence saying that you’re vouching for it. If it stuffs up or causes an issue with a client’s machine, then you’re the one responsible.

    Just be careful.

    PS. captchas suck :-)

  2. Yes you are right, you always need to check the license to verify if this violate it.
    sorry for the captcas :P but it saves me from a lot of spam into comments, maybe in the future I’ll try to remove it to check if akismeth is enough to avoid spamming

    thanks for the comment.

    alk.

  3. Thanks for sharing this. It works great for my personal projects :)

Leave a Reply