开发者

signing assemblies with a strong name, ok, but what if some 3rd party DLL isn't signed?

I understand the basic idea behind signing assemblies but have a problem when using Telerik or 2rd party DLLs. I ha开发者_如何转开发ve 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.


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


Yes, quite possible.
Here are the steps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜