Load an assembly using a relative path

T

timnels

I would like to create a routine that loads an assembly only knowing
it's name (like abc.dll) which I know is in the same directory as the
executing assembly. Do all methods require an absolute path? Is there
a way around this? Thanks!
 
M

Mattias Sjögren

Do all methods require an absolute path?

No. And even if they did, you could easily get it. Just find the
directory of the current assembly (from Assembly.Location for
example), and add the file name of the other assembly.


Mattias
 
G

Guest

You can use the "~" operator if the assembly is with in any of the subfolders
of the application path.

Reply back for more info, meanwhile HTH
 

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