Hello all,
in one of my (VO) applications I'm using several COM modules, and with a new version of a used library I had the problem that I had a classic case of DLL hell: two libraries I used had dependencies on different versions of the System.Threading.Tasks.Extensions.dll library.
After a few hours of searching I found a very interesting solution: put them in different subdirectories of the application directory and then use the AssemblyResolve event to redirect the load to the correct path:
I've had similar issues at times. You can probably also use a binding redirect in an assemblyname.exe.cfg file, to avoid distrbuting multiple versions of the file. Something like this:
Hi Nick,
I saw that also, but since the DLLs that are loading the conflicting DLLs are not mine, I just preferred to to don't change the manifest.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
I remember the phrase of some enthusiastic programmer colleagues over 10 years ago on a VO-Conference: Dotnet is so great: DLL Hell does not exist anymore. All Dlls load the correct version they need. ... and so on. (Runtime errors should also be nearly excluded)
But this is a joke.
Thankfully DLL Hell has diminished very much in the last years, not only because of Dot net, but because of many changes in the operating systems and in the programming methods. One of the worse problems were the dlls that had to be registered for com object usage. Fortunately they diminish. Even Crystal Reports with the Runtime version 13 for Dotnet has succeeded getting rid of these dll class registrations.
Arne