Hey All,
I'm currently working on a program that dynamically loads assemblies from a
directory each into their own seperate AppDomains using a somewhat logical
extension of Eric Gunnerson's article found at:
http://msdn.microsoft.com/library/de...rp05162002.asp
Now the problem I'm having is that, though I've created a remote loader,
when I try to load an assembly from a method in the RemoteLoader which
essentially calls AppDomain.CurrentDomain.Load(filename) from within the
RemoteLoader I'm getting all sorts of errors stating that it can't find the
assembly I'm referencing. The method returns Type[], so I'm not sure if that
affects anything, but from what I've read so far it might (Suzanne Cook's
blog from: http://blogs.msdn.com/suzcook/archiv...12/57169.aspx).
When I investigate further and capture the
AppDomain.CurrentDomain.BaseDirectory within the RemoteLoader instance I find
that it's listing the directory my base AppDomain is running from. This
strikes me as weird because I was absolutely certain to use the new AppDomain
to CreateInstanceFromandUnwrap the instance of RemoteLoader.
All of this has me very confused as to why it can't find my assembly, and
even more so when I call the Load() function off of my newly created
AppDomain I receive a Serialization error stating that it doesn't have enough
information to serialize the type. Again, more confusion. I would greatly
appreciate some further insight into resolving this problem.
Thanks,
Jon