Is this possible in anyway? For example through having named appSettings sections, or appSettings nested in other named sections.
I want to achieve something like the following:
<section name="development">
<appSettings>
</appSettings>
</section>
<section name="test">
<appSettings>
</appSettings>
</section>
string connectionString
= ConfigurationManager.GetSection("test").AppSettings["connectionString"];
What is the pattern for this?
The appSetting element supports a “file” attribute, which lets you specify a filename were key/values can be placed.
This lets you not share with the team the values you’ve specified in user.config.
I think, if you define a single key in both the parent and child config files, the child value will be ignored and the parent value will be respected.
Further Reading