views:

429

answers:

1

Why do Settings.settings files dump all their values into the app.config?

Its not that much of a big problem, however, my application is getting larger and I think grouping them into separate files would help me organise things better. I was thinking of just creating multiple settings files, which is fine, but app.config is blowing up mighty big.

What's everyone's take on the app.config? Do you really care about it since logically everything is grouped in your solution or do you like to have some order after the deployment as well?

+1  A: 

for some sections you can specify external config files ... just as a hint :)

eg

<appSettings configSource="appsettings.config" />

edit:
your app.config will get smaller due to swapping out the settings to a seperate file. you can then seperate from production and test settings (maybe in the build process, eg. this or this)

more info here

edit:
found another solution to not swap a whole section out, but add a delta to a section (more info here)

eg

<appSettings file="config.config">

edit:
short answer: you are probably using not the user-property for your settings, so your settings will get stored in the app.config (or .dll) to basically not be changable during runtime (there are some "hacks" for that). if you want to change your settings, use the user-property!
here's a nice description...
ps.: sorry for editing so much! :)

Andreas Niedermair
this simply changes the source, doesn't break them up.
Sir Psycho