Hi,
In my application I create a secondary AppDomain and load assembly "Foobar".
Shortly after, I call:
foreach( Assembly a in AppDomain.CurrentDomain.GetAssemblies( ) )
{
Trace.WriteLine(a.FullName);
}
And wouldn't you know it, the "Foobar" assembly appears in the *current* app domain. I didn't think this assembly would be present because it should be in the secondary app domain. If you hold the mouse over CurrentDomain, the tooltip says:
"Gets the current application domain for the current System.Threading.Thread"
It was then that I seem to recall this:
"Managed threads have no app domain affinity, meaning a thread can enter and exit any app domain..."
So really, the thread is returning assemblies across all app domains, not simply the "current" one.
Is this indeed what is going on Or am I completely wrong
Regards.

I want to confirm this about AppDomains.
WimB
Maybe Brad Abrams blog entry Use of AppDomain.Load() is of interest for you.
AppDomain.Load() is only meant to be called on the current AppDomain (for use by Interop callers). If you call it on a different AppDomain, if the assembly successfully loads in the target appdomain, it will then be loaded in the current appdomain, causing the FileNotFoundException for you.
Joshua Morgan
I see now that I have to load assemblies from inside the other domain.