7

Why the c# allows project not to be strongly signed when they are build? They may be signed by some automatic name file if programmer do not choose his(hers) own sign file. Where is the advantage of not signed .dll file?

What the strong names are?

I am working on project which uses C# .dll files in Microsoft Dynamics AX. If the .dll file has the strong name it is easy to use. If not the fun begin.

If the .dll do not have strong name

  1. You can not easy install it to gacutil

  2. You can not use it as a reference when you build a project with strong name.

  3. It can leads to DLL Hell

I see only disadvantages of project without strong names so I want to know if I miss see something or there is some tricky historical consequences why they are still allowed. I want to know if there is some advantage of using them.

It should be possible to add strong name to .dll file without compiling but I was not able to use this because I end after I try to use ILASM.exe with "The program can't start because fusion.dll is missing from your computer, Try reinstalling the program to fix this problem." even if the fusion.dll is in the system (We decided to use different approach so I don't have time for more tries on this solution.)

  • 4
    Most programs should not be installed into the GAC in the first place. So there is little reason for strong naming in those programs. – CodesInChaos May 23 '14 at 7:37
  • @CodesInChaos the strong name do not force you to install it :D :D :D just allow it. But you have a point. There is problem when the reason to use it occures or if something which uses it as reference wants to be used because you can not have reference to not strongly signed ... – boucekv May 23 '14 at 7:40
7

Some reasons NOT to sign an assembly:

  1. Because signed assembly can only load other signed assemblies. - a real problem if you rely on 3d party libs.
  2. When project is signed it's requires to have the versions, so you can't use direct bindings between your projects in the same solution or you'll have to recompile the application to be able to use a different version.
  3. Apart from the obvious inconvenience, there's also some performance issues (not significant though) because of verification of the signature. (If you interested to know the performance issue in depth , read here strong name by Richard Grimes

P.S. C#: why sign an assembly?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.