使用未签名程序集签名的那些

问题描述:

发现所以这些有用的链接curtosy。

found these helpful links curtosy of SO.

http://buffered.io/posts/net-fu-signing-an-unsigned-assembly-without-delay-signing/

How修复"引用程序集没有强名称"错误(VS2005)

我跟随的过程。这似乎很容易做到。只是不知道是否有一个点和点击自动化的工具,将做到这一点对我来说 - 尤其是对的情况下无符号的第三方A.DLL引用未签名的B.DLL它引用未签名的C.dll

I follow the process. It seems easy enough to do. Just wondering if there's a point-and-click automated tool that will do this for me -- particularly for the case where unsigned 3rd party A.dll references unsigned B.dll which references unsigned C.dll.

您可以注册程序集自己,这样你可以参考他们在被签署,如果你无法获得笔者为强征他们的项目给你。

You can sign the assemblies yourself so that you are able to reference them in a project that is also signed if you are unable to get the author to strong sign them for you.

做到这一点的组装拆卸成IL,然后用自己的强名称密钥文件重新组装。

Do this by disassemble the assembly into IL and then reassemble it with your own strong name key file.

打开 Visual Studio的命令提示符并浏览到包含未签名的程序集的目录。在命令提示符下运行以下命令。

Open a Visual Studio command prompt and browse to the directory containing your unsigned assembly. Run the following commands from the command prompt.

ildasm.exe /all /typelist /out=My.Unsigned.Assemby.il My.Unsigned.Assemby.dll

这将创建一个IL版本叫拼装的的 My.Unsigned.Assemby.il

This will create an IL version of the assembly called My.Unsigned.Assemby.il

接下来,您需要使用您的强名称密钥重新组装这个不用修改。

Next you will need to reassemble this without modification using your strong name key.

ilasm.exe /dll /optimize /key=MyKeyFile.snk My.Unsigned.Assemby.il

您现在落得同样的组件,它只是一个签名版本。你可以阅读更多有关 但我相信你已经知道如何此基础要做强名称密钥生成关于这个问题的。

You will now end up with the same assembly, just a signed version of it. You can read more about strong name key generation but I assume you already know how to do this based on the question.

更新:我写一个应用程序从一个用户界面,命令行或编程通过API自动执行此操作。它可以处理所有的边缘情况,以及像组装回到了正确的版本与正确的标志。你可以阅读更多关于它在这里下载该工具:http://brutaldev.com/post/2013/10/18/NET-Assembly-Strong-Name-Signer

UPDATE: I have written an app to do this automatically from a UI, the command-line or programmatically through an API. It handles all the edge cases as well like assembling back to the right version with the correct flags. You can read more about it and download the tool here: http://brutaldev.com/post/2013/10/18/NET-Assembly-Strong-Name-Signer