签约pre-构建组件 [英] Signing pre-build assemblies

查看:144
本文介绍了签约pre-构建组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我经过的IL挖,希望有人之前已经遇到了这个问题:

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

尝试登录第三方组件(在此情况下,最新的HtmlAgilityPack)。我以前没有问题,做到了这一点。这样做一般的反汇编=> ILASM,但是当我去用我的新签名的程序集,Visual Studio中抱怨它不能枚举资源的可执行文件。可能是什么原因?

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?

推荐答案

我以前也干过。如果它只是管理,一次通过Mono.Cecil能做到和Mono.Security可以做到这一点。

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

如果你在赶时间,拆解与ILDASM,公钥声明添加到生成的文件的.il(这是一个漫长的文本文件,引用的语法拆卸签名的程序集),并重新编译与ILASM。不要忘了重新链接资源与/res:assemblyname.res。

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.

这篇关于签约pre-构建组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆