Signing pre-build assemblies

ぐ巨炮叔叔 提交于 2019-12-23 03:21:16

问题


Before I go digging through the IL, hopefully someone has run into this issue before:

Trying to sign a third-party assembly (in this case, the latest HtmlAgilityPack). I've done this before with no issues. Doing the usual ildasm => ilasm, but when I go to use my newly-signed assembly, Visual Studio complains it "cannot enumerate resources in the executable". What might cause this?


回答1:


I've done it before too. If it's managed only, one pass through Mono.Cecil and Mono.Security can do it.

If you're in a hurry, disassemble with ildasm, add the public key declaration to the resulting .il file (it's a long text file, reference a disassembled signed assembly for syntax), and recompile with ilasm. Don't forget to relink resources with /res:assemblyname.res.



来源:https://stackoverflow.com/questions/7781734/signing-pre-build-assemblies

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!