my desired app.config would look like this:
<configSections> <sectionGroup name="QA_Environment"> <section name="databases" type="System.Configuration.NameValueSectionHandler"/> <section name="storageSystems" type="System.Configuration.NameValueSectionHandler"/> </sectionGroup> <sectionGroup name="Production_Environment"> <section name="databases" type="System.Configuration.NameValueSectionHandler"/> <section name="storageSystems" type="System.Configuration.NameValueSectionHandler"/> </sectionGroup> </configSections>
... and then I have the actual groups and sections right below that. But I would be happy with any jobs or best offers. Now I have omitted my wishes:
<configSections> <sectionGroup name="QA_Environment"> <section name="appSettings" type="System.Configuration.NameValueSectionHandler"/> </sectionGroup> <sectionGroup name="Production_Environment"> <section name="appSettings" type="System.Configuration.NameValueSectionHandler"/> </sectionGroup> </configSections>
And I think it's fine ... The main thing I'm interested in is that I can replace one of these sections with the root level of appSettings ... without repeating through them and programmatically add or create a configuration and save it, I just want so that the user can select the environment, the select event will change appSettings ...
One limitation that I am facing is that the data layer that I refer to must remain the same as it .... therefore I basically need my app.config to be accessible in exactly the same way as these other projects are now ... this is ConfigurationManager.AppSettings [afdasdf]
Let me know if this requires any clarification ... thanks
source share