Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

found these helpful links curtosy of SO.

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

How to fix "Referenced assembly does not have a strong name" error?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
237 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.

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

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

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...