To instruct the CLR to probe under the Modules\XXX subdirectory, create a new configuration file
named applicationname.exe.config
using any text editor or use the supplied App.config file, and save the file in the folder containing the
applicationname.exe
application, which, in this example is Application.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Modules\XXX"/>
</assemblyBinding>
</runtime>
</configuration>
say you want to specify an assembly using absolute path or relative one (not in same directory hierarchy as the .exe) , use <codebase>
instead, anyway these two approaches are bound to the usage of xml configuration files.
Assembly.LoadFrom(...)
Is indeed <codebase>
equivalent; can take both relative and absolute paths
main reference: Pro C# 5.0 and .net 4.5