One of its dependencies is missing! Help!

G

Guest

AppDomain appDomain = AppDomain.CreateDomain("appDomain", null, null);
try
{
appDomain.Load(@"FF-DeliousDateTimeRequestor.dll");
}
finally
{
AppDomain.Unload(appDomain);
}

Does anyone know why im getting this exception?

"File or assembly name FF-DeliousDateTimeRequestor.dll, or one of its
dependencies, was not found."

While i have placed that DLL in all folders of that project to be sure but
still its still showing that exception. Thank You so much in advance! Badly
needed for my thesis.
 
G

Guest

Hi Rain,
the string passed to the Load method should be the name of the assembly,
not the path or filename so remove the .dll extension from the name, that
might be your issue.

If not looking at the documentation for Assembly.Load gives the following
note, which may be related to your problem:

"An attempt to call AppDomain.Load on an application domain that is not the
current application domain will result in a successful load of the assembly
in the target application domain. Since Assembly objects are not
MarshalByRef, when the method attempts to return the Assembly object for the
loaded assembly to the current application domain (i.e., the callers
application domain), the runtime will try to load the specified assembly into
the current application domain. The load may fail if the configuration
settings (such as AppDomainSetup.ApplicationBase) for the two application
domains are different. Even when the loading into the current application
domain succeeds, the Assembly object that is loaded into the current
application domain is different from the assembly that was loaded into the
target application domain."


Mark.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top