I have a rather unusual problem and need some ideas.
I maintain two codebases that are 99% identical. A new project has come along that under some runtime condition needs to use code base A and in other conditions use precompiled code base B.
I have abstracted the functionality into an interface for the project and plan to have two implementation assemblies that reference the different code bases. I plan on using a service locator pattern to instantiate the object. So it looks a little like this.
Assembly A (Website) Assembly B Libraries
-------------------------------|--------------------|-------------
Project -> Service Locator -> Implementation A -> Code Base A
-> Implementation B -> Code Base B
My concerns lie around in loading the same named assemblies of code base a and b and having runtime conflicts.
What is the best approach for this scenario and why?