I have read the numerous questions here on this and even posted one of my own trying to get to the bottom of this(My Previous Question). Unfortunately, none of them answer my question. My .Settings
file get's reset whenever I deploy an update through ClickOnce. I thought ClickOnce was supposed to handle this sort of thing for me but since it seems no, I implemented the .Upgrade()
with a Settings Flag like so:
if (Settings.Default.MustUpgradeSettings)
{
Settings.Default.Upgrade();
Settings.Default.MustUpgradeSettings = false;
Settings.Default.Save();
}
Which I check OnLoad()
. Am I missing something? This is seriously driving me nuts!
I have also posted this at MSDN, HERE, and they are even less help then SO so far. I just know that I will end up with "egg and my face in alignment" when this is all over I just wish someone could point that out for me...
I believe it's supposed to do that, at least from what I'm reading here.
http://msdn.microsoft.com/en-us/library/ms228995.aspx
Just as each version of a ClickOnce application is isolated from all other versions, the application settings for a ClickOnce application are isolated from the settings for other versions as well. When your user upgrades to a later version of your application, application settings compares most recent (highest-numbered) version's settings against the settings supplied with the updated version and merges the settings into a new set of settings files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With