What order of executables does a DLL look for?

Possible duplicate:
In what order are the locations for finding related DLL files found?

I have an executable file foo.exe that references bar.dll. I have to put bar.dll in the same folder where foo.exe, or put bar.dll in the GAC. I was wondering if I can put bar.dll in another directory (for example, the bin directory) and ask foo.exe to look for a DLL in this directory?

Also, what order is foo.exe looking for a DLL? Current folder? is the gac?

+3
source share
4 answers

You need to handle AppDomain.AssemblyResolve if your assemblies are neither in the GAC nor in the local directory.

+1
+1
source

yes, you can do this even if you can place it in a remote location, and during the testing phase will try to find it. Searh for Assembly Research

0
source

Source: https://habr.com/ru/post/1777821/


All Articles