Automatically “upgrade” user settings from previous version of app.config file?

后端 未结 3 539
故里飘歌
故里飘歌 2020-12-08 10:29

Every time I compile my app and the version number changes (I have an auto-incrementing build number), I lose the user-configured app.config settings, since they\'re stored

3条回答
  •  暖寄归人
    2020-12-08 10:49

    Have you looked at ApplicationSettingsBase.Upgrade()? It allows the settings to be upgraded from a previous version using the following call:

    My.Settings.Upgrade()
    

提交回复
热议问题