I created a wrapper class which inherits from the MarshalByRefObject then loads and returns an assembly in this wrapper class. At the client application side, I used the new created AppDomain and call its CreateInstanceFromAndUnwrap method to create an instance
of the wrapper class. Finally I was trying to get the returned assembly from the wrapper object and I got an exception indicating that the assembly file was not found.
However if I just return the assembly's name from the wrapper class, it works great, nothing was wrong using that approach.
I think maybe this is because that the Assembly class is not inherited from the MarshalByRefObject class so it doesn't make sense to pass between the application domains. I am not sure if my thinking is correct.
View Complete Post