How to use two different versions of same dll in ASP.Net?
When using 3rd party libraries, sometimes they let out a new version. And sometimes that new version breaks something that used to work in the old version, but also adds features you need. So you found yourself having to use one method from the old version and another from the new version of the same library. There are two problems here: It won’t compile. Both libraries have the same namespace, causing ambiguity the compiler can’t handle. It won’t run. The referenced DLLs are copied to the output dir, but because they have the same name, they will override each other, and will cause the runtime loading of the assembly to have a version mismatch. Welcome to DLL hell. The solution Let’s take my client’s project as a practical example. The project was using a 3rd party library by Winnovative Software, for handling pdf operations. The new version of the dll broke some specific functionality that had to be supported. The DLL name: wnvhtmltopdf.dll The old version: 14.2 The...