I have two versions of the same c# dll. Let's call the dll foobar.dll. I have versions 11 and 12 and I need both in the same csproj file. However, two separate classes use dependencies which require either version 11 or 12 of foobar.dll.
As an additional constraint, both versions are not backward compatible. This means primarily that version 11 use to have Object A and B in the same foobar.dll but that version 12 has Object A and B in 2 separate dlls foobar.dll and foobarPlugin.dll respectively. Hence, only using versions 12 gives runtime errors.
Is there a way to containerize dll versions to specific classes for this scenario?