I'm creating a new sandbox AppDomain whose ApplicationBase and PrivateBinPath (for example sake) has been set to C:\MyApp
. My executing application is running from C:\SomewhereElse
.
When I otherDomain.Load(...)
an assembly, my executing AppDomain is also loading the assembly. I'm determining this by checking GetAssemblies()
before the load, and then also the GetAssemblies()
after the load.
Why is this happening? I suspect it has something to do with the meta-data needing to be available in the executing AppDomain and it's passed back over from the new domain via 'Cross Boundary', so the calling domain is loading the assembly too. But! I thought that an assembly couldn't be loaded outside of it's ApplicationBase, unless it was in the GAC, which in this case, it's not.
Can anyone help with my confusion?