How to manage run-time loaded dll versions?
-
12-11-2019 - |
Question
A bit of background:
I have a library project A, which contains a lot of data and some managed DLLs. This project has its own installer (due to its size) and can be installed independently.
Then I have some other projects which can provide extra features when they detect that project A is also installed.
Setup: I created an Interface.dll which contains intefaces that are implemented by project A. All other projects include this DLL so I can load project A at runtime and cast it to specific interface.
The problem occurs with versioning. Sometimes some projects will include newer version of Interface.dll while installed project A has dependency on an older one. When this happens my cast no longer works.
I am considering some possibilities:
- Ditch interface.dll and load everything dynamically.
- Some version detection and inform user to update his version of project A.
- Use some other means of communication (e.g. command line)
No correct solution