Application settings appear after clean when program copied elsewhere

孤街浪徒 提交于 2019-12-06 06:25:26

When you use Settings.Settings in a normal way, considering these facts will help you to have a better understanding about user settings:

  • When you save settings using Properties.Default.Settings.Save() current values for user settings are stored in %userprofile%\appdata\local in a folder with the name of your application in a sub folder which is unique for deployment.

  • Each deployment has a unique path, so when you copy your application in a previously used path, it assumed as an update to your previous deployment and your previous user setting will be remembered and merged with new added settings.

  • If you copy the application in a totally new path, it assumed as a new deployment and your previous user settings will not be remembered.

  • Only the default values are stored in .config file beside .exe of your application, so deleting them has no impact on remembering the user saved values.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!