I have a few .net modules/libraries I am referencing from my main application. Each of the modules/libraries can be configured and after I build them they each have a configuration file such as MyModule1.dll.config, MyModule2.dll.config.
When I build my main application an app.config file is outputted to the output directory.
I am wondering how to configure MyModule1, MyModule2 etc. Should I include config sections for each in the app.config file or should I have a separate config file for each module where I load a config file for each one? The separate config per module is described here: http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/2710647c-6414-42c4-90b7-fd7603f55ae0/? This would mean that I would copy MyModule1.dll.config and MyModule2.dll.config to the output directory as well.
Can anyone give me some advice on what is the best practice/proper way to do this?
Edit:
From MyModule1.dll I can explicitly load MyModule1.dll.config using
Uri p = new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
Configuration config = ConfigurationManager.OpenExeConfiguration(p.LocalPath);
but if MyModule1.dll references and uses one of my common libraries MyCommonLib.dll how can I have MyCommonLib.dll be configured from the same config file MyModule1.dll.config?