I am currently working on a data harvester for a project. The way it works is it basically calls another program which collects the data, and that program returns a data structure containing a collection of queue information. The harvester then serializes out the data. The program that actually collects the data is maintained by another team, and recently they did an upgrade and decided to restructure their code. The method I am calling is still in the same location, however, the data structure I get back got moved to a different assembly (it's code remained the same). The fun part of this is that we have both versions of this product in the field right now, so depending on which version a client has, the data structure I need may be in one of two different assemblies. My boss wants to try to only have one version of the harvester program if possible.
So, my question is this: using C# and .NET 3.5, is there a way to pick which assembly to use at runtime? I think I could use reflections, but I'd like to know if there's any way I could write the code normally for compile time and then resolve the dependency at run time depending on the other program's version.