sign a third-party dll which don't have a strong name

Problem: Assembly generation failed -- Referenced assembly '' does not have a strong name

Cause: this is due to you have referenced a third-party dll which doesn't have a strong name.

Solution:

  1. open Developer Command Prompt for Visual Studio cmd and run as administrator. Enter the dll folder which you have referenced.

    cd "C:\MyFolder"

  2. decompiling the dll to IL

    ildasm /all /out=Test.il Test.dll

  3. Generate a key file

    sn -k mykey.snk

  4. compiling the IL to dll again.

    ilasm /dll /key=mykey.snk Test.il

 

你可能感兴趣的:(name)