Home > DeveloperSection > Interviews > What is DLL Hell Problem? How this problem is resolved?

Posted on    September-22-2016 6:46 AM

 C# C# 
 1 Answer(s)
  752  View(s)
Rate this:

Abhishek Srivasatava
Abhishek Srivasatava

Total Post:70

Posted on    September-22-2016 6:46 AM

DLL hell problem

When we install any application in our system, then dll file get stored in the registry, then we install another application which is having same name .dll file , then new dll file overwrites the old dll file. In this case, system was working fine for new application but not working for old application.

Solution to this problem:

Assembly Versioning.

This problem is solved by using the concept of Assembly versioning.

Once a .Net component/dll is installed, the Global Assembly Cache looks at version,  public key and language information and creates a strong name for the component/dll which is called as Strong Named Assembly. Hence, with same name of assembly could be installed in the GAC that may have two different versions. Once versioning is done with any assembly there will be no chance to conflict, which was earlier happening (DLL HELL).


* Static Linking

It is a very simple technique to solve DLL Hell problem. In this solution instead of picking up from the system library, compiler pick all the dll file statically from the application folder, mean to say each application have their own library which is statically link to the application. This method was mostly used C/C++ application. This method eliminate dll concept completely.


* Windows File Protection

Dll hell problem was significantly reduced by this concept. This concept was used in Windows 2000. This method prevents unauthorized application from overwriting system dll. If application uses the specific windows API then it only system will allowed to override. But there was a risk when there is a update required from Microsoft for the existing dll.

Don't want to miss updates? Please click the below button!

Follow MindStick