Summary:
1. For native C ++ world, dynamic-link library search order is clear. There is another question: If you create a new folder in any directory, put the DLL and dependency DLLs required by an application, such as plugin, when you load the dependency DLLs required by this plug-in (if a DLL with dependencies is loaded by specifying a full path, the system searches for the DLL's dependent DLLs as if they were loaded with just their module names .) will this new folder be searched?
2. For DOTNET world, there are two application-level files: app.exe. manifest and app.exe. config. Next, we will give a comprehensive introduction to how to locate assembly in runtime CLR. The simple version is thatGAC is searched firstly, and then the app path tree. % PATH % is never used.Basic knowledge:
1)In DOTNET world, a private assemblyIs stored in the application's directory and used by a single application.A share assemblyCan be used by multiple applications and is stored in the Global Assembly Cache, a repository of assemblies maintained by the. NET Framework.
2) The difference between GAC and sidebyside is described in detail in this blog.
3) If you do need to move the private assembly of an app (to a certain extent, but it is definitely not qualified in GAC) out of the app path, ms also provides a mechanism to help you locate the successful Assembly: assemblyresolver. For more information, see this blog assemblyresolver.
4) use assembly binding Log Viewer (fuslogvw.exe) to debug any assembly loading problems.
Reference: in what order are locations searched to load referenced DLLs?