I have a large config file (user) that i needed to go to the right location and have some default values.
Since i have a installer class, i added some parameter setting to the config file in it, but created the config files in the installers folder.
What is the best way to ensure these default parameters will be written only once, and in the right location?
A standard way of using defaults in the app.config. For example, here’s a default value per version I use to ensure the code copies user settings between upgrades:
You will need to add a .settings file to your project, or go to your project properties -> Settings and configure them from there.
The location of the user’s own settings file is usually placed within their AppSettings folder in their profile. I’m not sure if this can be changed, but I seem to remember reading out it.
EDIT
There’s some more information about it here: Application Settings Architecture
It also shows the following example if you want to keep it simple:
And this looks like it’s very important to note when using this (quote):