Read the .config file in another assembly

Is it possible to read the .config file in the assembly dll? I am currently using OpenExeConfiguration on the Assembly.Location property, which seems to work. But I want to create separate .config files for different use cases like ConfigModuleA.config, ConfigModuleB.config, etc.

Any idea?

0


source to share


2 answers


Ok I have simplified it. I saved the configuration data in simple structured xml files and nested it in dll. Now I can use XML serialization to read configuration from dlls without any stress.



thanks for the answer!

0


source


Do you want to read a different application config file or just have some sections of the config file in a separate file (say, to make it more manageable)?

Whereas the latter just provide an attribute configSource

in the config section that you want to place somewhere else.



See - http://msdn.microsoft.com/en-us/library/ms228167.aspx

+1


source







All Articles