When we install the new version of our app (in my case, office add-in), the new settings folder is created in a new path with new version number. We can update our settings calling Settings.Default.Upgrade()
I wonder - what will happen if for example, in the version 1.0 I had the following settings (setting names):
Name
Color
Font
And in version 1.1 I decided to not use some settings anymore in my app and I added new ones, so the new setting file (default) has the following settings names:
Name
Font_Color
Font_Style
If I decide to call Settings.Default.Upgrade()
what will happen with my settings file? All settings will be merged and some settings (in my case, Color
and Font
) won't be used? I am trying to predict potential future changes to my settings and I wonder what will happen if I decide to add or remove certain entries. New, upgraded config file will consist of all previous settings (if upgraded) but my app will simply not use them?
I expect that the file after upgrade would consist of the following settings:
Name
Color (not used anymore)
Font (not used anymore)
Font_Color
Font_Style
Am I right or upgrade works different in regards to added/deleted settings?
Should I delete old, unused settings or simply let them be? What is the best practice in this case?
question from:
https://stackoverflow.com/questions/65601767/what-happens-after-settings-update 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…