How .NET runtime locates assemblies
This article talks about this topic in detail.
Usually the assemblies are found in the same directory of the running process. But it can be extended by using the application config file or web.config
(same schema). The main configuration point is <assemblyBinding>
tag. There're two ways to it:
In the first approach, you can specify each individual assembly with <dependentAssembly>
tag. It even allows you to specify version redirection:
1 | <dependentAssembly> |
In the second approach, you can specify a "probing" sub-directory with <probing>
tag. The limitation is that the probing location has to be a sub-directory of the process directory.
1 | <configuration> |