Location of DLL

  • Thread starter Thread starter Atchoum
  • Start date Start date
A

Atchoum

This is probably a stupid newbie question but here we go.
I have a DLL which references another DLL. If I want to put this other DLL
in a subfolder of the folder where the main DLL is, how do I tell the main
DLL where to look for?

TIA.
 
you might try this:

mySubDllPath =
system.io.path.getdirectoryname(system.reflection.assembly.getexecutingassem
bly.getname.codebase) & "mysubdirectory"
 
Adam,
Thanks for your reply.
I am not sure I understand how to use this...
Is this a way for the main DLL to know where to look for the 2nd DLL?

Atchoum
 
Atchoum said:
Adam,
Thanks for your reply.
I am not sure I understand how to use this...
Is this a way for the main DLL to know where to look for the 2nd DLL?

Atchoum

The string Adam gave you would be used with Assembly.Load(). You will have
to load the 2nd DLL before you can use it, since it is not in a place where
the .NET framework could find it automatically.

Best Regards,

Andy
 

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

Back
Top