使用强名称对程序集进行签名,可以,但是如果某些第 3 方 DLL 未签名怎么办?

发布于 2024-10-03 09:00:24 字数 249 浏览 0 评论 0原文

我了解签名程序集背后的基本思想,但在使用 Telerik 或第二方 DLL 时遇到问题。 我有一个 .exe,它使用 2 个我自己的 .DLL,这些 DLL 又使用 Enterprise 库 DLL 和 Telerik DLL。

我给所有项目起了一个强名称 .snk,但是在编译时,编译器解释说企业库 DLL 等未签名,这是有道理的。

我不想使用 te sn.exe -Vr 命令关闭验证,甚至不想延迟签署我的项目。但这要如何运作呢?我很感激任何见解。

I understand the basic idea behind signing assemblies but have a problem when using Telerik or 2rd party DLLs.
I have an .exe that uses 2 of my own .DLLs, the DLLs in turn make use of the Enterprise library DLLs and Telerik DLLs.

I gave all my projects a strong name .snk, but when compiling the compiler explains that the enterprise library DLLs, for example, aren't signed, which makes sense.

I don't want to turn off the verification with te sn.exe -Vr command or even delay sign my projects. But then how is this going to work? I'm grateful for any insight.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

巷子口的你 2024-10-10 09:00:24

签署/辞职第三方集会虽然不方便,但并不是什么复杂的事情。
假设您想使用 default.snk 密钥对未签名的 dll(例如 System.ComponentModel.Composition.dll)进行签名:

打开 VS 命令提示符并 cd 到包含未签名 dll 的文件夹

ildasm /all /out=System.ComponentModel.Composition.il System.ComponentModel.Composition.dll
ilasm /dll /key=default.snk System.ComponentModel.Composition.il
del System.ComponentModel.Composition.il

在每个适用的 VS 项目中,删除并添加回来对签名程序集 System.ComponentModel.Composition.dll 的引用

It's inconvenient, but not rocket science to sign/resign third party assemblies.
Assuming you want to sign an unsigned dll like System.ComponentModel.Composition.dll with the default.snk key:

open the VS command prompt and cd to your folder with the unsigned dll(s)

ildasm /all /out=System.ComponentModel.Composition.il System.ComponentModel.Composition.dll
ilasm /dll /key=default.snk System.ComponentModel.Composition.il
del System.ComponentModel.Composition.il

In each applicable VS project, remove and add back the reference to your signed assembly System.ComponentModel.Composition.dll

比忠 2024-10-10 09:00:24

是的,很有可能。

以下是步骤。< /a>

Yes, quite possible.

Here are the steps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文