Hi, Nicolasbolbol,
Based on my understanding, you want to reference to the same dlls of the different versions, don't you?
I think a pratical solution for you is to use reflection technology in .Net.
And you can just add the two dlls into two folders (not reference).
Then load them dynamically.
For example, I have one library class named Class1
Code Snippet
myClass
public class Class1
{
public Class1()
{
System.Windows.Forms.MessageBox.Show("Version1"); //I have another Version2
//System.Windows.Forms.MessageBox.Show("Version2");
}
}
Code Snippet
Assembly assembly1 = Assembly.LoadFile(System.Environment.CurrentDirectory+"/version1/myClass.dll");
Type myClass1 = assembly1.GetType();
object cls = assembly1.CreateInstance("myClass.Class1");
Assembly assembly2 = Assembly.LoadFile(System.Environment.CurrentDirectory + "/version2/myClass.dll");
Type myClass2 = assembly2.GetType();
object cls2 = assembly2.CreateInstance("myClass.Class1");
http://msdn2.microsoft.com/en-us/library/cxz4wk15.aspx
Hope this helps,
Regards |