Lets say i have the below assembly files reference in my solution:
- a.dll
- b.dll
- c.dll
- Main_43.dll
- a_40.dll
- b_40.dll
- c_40.dll
- Main_40.dll
My console application used to load only the first 4 before as the client used Main_43.dll which internally used a,b and c dll files. Now, i have to add a new client to my console application that will be using Main_40.dll which is the older version of Main_43.dll(I have to use the old version. No option to upgrade). I have renamed a, b and c dll files for this version by suffixing '_40' as seen above.
I have referenced all of them in my console application. How can i tell the application to use Main_43 or Main_40 based on the parameter i pass to console app and how can i be sure that Main_40 will reference a,b and c dlls files that are meant for v40 and vice versa?
Also, what is the best practice to call methods in my program that might me in both dlls? Should i use the full reference name such as:
Main_40.Export exportData = new Main_40.Export();
or is there a better way?
The assembly files are strong named