The Code as below which i'm trying to load a dll dynamically is not working.
AppDomain appDomain = AppDomain.CreateDomain("DllDomain");
Assembly a = appDomain.Load(fileName);
//Assembly a = Assembly.LoadFrom(fileName);
objType = a.GetType(className);
obj = a.CreateInstance(className);
object[] args = new object[1];
args[0]=(object) "test";
object ret = objType.InvokeMember("Perform", BindingFlags.Default | BindingFlags.InvokeMethod, null, obj, args);
string output = ret.ToString();
obj = null;
AppDomain.Unload(appDomain);
this is the code i am using inside a WCF service but still it does not work.
Heard that we can acheive using 'Shadow Copying' in AppDomain. But i dont know anything about 'Shadow Copying' and how to implement the same in the above code.
Please provide working code as example for 'Shadow Copying'.
-B.S.