How to add folder to assembly search path at runtime in .NET?
Posted
by Valery Tydykov
on Stack Overflow
See other posts from Stack Overflow
or by Valery Tydykov
Published on 2009-09-03T12:26:40Z
Indexed on
2010/06/12
19:12 UTC
Read the original article
Hit count: 215
My DLLs are loaded by a third-party application, which we can not customize. My assemblies have to be located in their own folder. I can not put them into GAC (my application has a requirement to be deployed using XCOPY). When the root DLL tries to load resource or type from another DLL (in the same folder), the loading fails (FileNotFound). Is it possible to add the folder where my DLLs are located to the assembly search path programmatically (from the root DLL)? I am not allowed to change the configuration files of the application.
© Stack Overflow or respective owner