In my applicaton im using user settings to store fields betwene runs. Like:
Properties.Settings.Default.bla = "bla";
When i release my code, do i need to include the .exe.config file?? Where are the fields stored??
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Zoran HorvatRank #792 · 2.9K reputationPosted Nov 15, 2010, 11:17 PM EST
Geir Ludde8 reputationPosted Nov 15, 2010, 11:25 PM EST
Zoran HorvatRank #792 · 2.9K reputationPosted Nov 16, 2010, 12:24 PM EST
Regarding user settings, I don't like the fact that it is far away from programmer's control. If you change GUID, for instance, new application will not be able to find previous settings and it will create new file with all settings gone. For that reason, I prefer creating my own file with settings, and to store it in Application Data directory myself. Do not try to store the file in application start-up directory because it will probably be read-only (especially if located under Program Files). Always use user's profile directory for temporary data, or ask user to point to specific read-write directory if you have to store permanent data.
Conclusion is that I'm using .NET Framework support for application settings in professional use, and custom settings in pet projects and in projects with security issues. Using .NET support for settings gives results quickly, but using custom settings gives high quality.
Geir Ludde8 reputationPosted Nov 18, 2010, 2:00 AM EST