.Net: Dynamically loads an assembly and loads its config?

If in the project execution folder / bin I have the following files:

MyDynamicLibrary.dll MyDynamicLibrary.dll.config 

and in my application I have the following:

 Assembly assembly = System.Reflection.Assembly.Load("MyDynamicLibrary"); 

If I call a method from this assembly object, has it already loaded the information in MyDnamicLibrary.dll.config ? If not, is there a way to load it so that the DLL functions correctly? Or do I need to add information in MyDynamicLibrary.dll.config to my .config application file?

+4
source share
1 answer

Quote from previous answer:

"[...] the read configuration file is the configuration file of the hosting executable." (Hans is right in his previous comment)

Please check this question; you probably also want to take a look at Microsoft's recommendations for downloading the assembly .

Best

Arthur

+2
source

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


All Articles