I have two separate class libraries: A
and B
.
Each class library references a third party library (Mapsui), but A
references a different version than B
. I have exported the third party library DLLs to two separate folders, one for each version. At runtime in my main WPF project, I attempt to load in each class library as a plugin.
B
works as expected since it references the newer version of the third party library but attempting to load A
crashes with a MethodNotFound
exception. The newer version of the third party library no longer contains the method that I call in class library A
, which is why I get this error.
I have attempted everything mentioned in a similar thread (Using multiple versions of the same DLL) and have been unable to avoid this exception.
I am wondering if there is anyway for my class library to essentially hide it's internal references from my main project that loads it so that I don't run into issues with DLLs and namespaces having the same names but different versions.
How could I go about solving this problem?