Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to configure multiple modules using .net configuration files
    primarykey
    data
    text
    <p>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.</p> <p>When I build my main application an app.config file is outputted to the output directory.</p> <p>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: <a href="http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/2710647c-6414-42c4-90b7-fd7603f55ae0/" rel="nofollow noreferrer">http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/2710647c-6414-42c4-90b7-fd7603f55ae0/</a>? This would mean that I would copy MyModule1.dll.config and MyModule2.dll.config to the output directory as well. </p> <p>Can anyone give me some advice on what is the best practice/proper way to do this?</p> <p>Edit:</p> <p>From MyModule1.dll I can explicitly load MyModule1.dll.config using</p> <pre><code>Uri p = new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase); Configuration config = ConfigurationManager.OpenExeConfiguration(p.LocalPath); </code></pre> <p>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?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload