I get an exception when trying to use AppDomain.Load( assemblyName ). The
name of the assembly for my example is "Helper." The exception reports:

 "File or assembly name Helper, or one of its dependencies, was not found."

When I examine the log produced by FUSLOGVW.exe, however, the loader
clearly is able to discover the Version, Culture, and PublicKeyToken from
the assembly I'm trying to load. I checked this by changing the version of
the target assembly, re-running, and viewing the Fusion assembly binding
log.

As a simple test, I wrote a console application that creates a new
AppDomain, supplying the AppDomain.CreateDomain method with an
AppDomainSetup object, whose ApplicationBase property is set to the
directory where the "Helper" assembly is located.

Though it did not visibly affect behavior, I set the
System.Security.Policy.Evidence of the new AppDomain object to the Evidence
of the application's default app domain.

I confirmed that using Assembly.LoadFrom( assemblyPath ) works as
advertised.

Finally, AppDomain.Load was able to work as long as the "Helper" assembly
was placed in the application's base directory. What I'm having difficulty
with is using AppDomain.Load to load an assembly from a directory indicated
by the ApplicationBase.

Thanks in advance for any assistance.

Reply via email to