I have a .NET 2.0 Windows Forms application. Where is the best place the store user settings (considering Windows guidelines)?
Some people pointed to Application.LocalUserAppDataPath. However, that creates a folder structure like:
C:\Documents and Settings\user_name\Local Settings\Application Data\company_name\product_name\product_version\
If I release version 1 of my application and store an XML file there, then release version 2, that would change to a different folder, right? I’d prefer to have a single folder, per user, to store settings, regardless of the application version.
I love using the built-in Application Settings. Then you have built in support for using the settings designer if you want at design-time, or at runtime to use:
It does store the settings in a similar folder structure as you describe (with the version in the path). However, with a simple call to:
The app will pull all previous versions settings in to save in.