User.Settings file returns values ​​when ClickOnce is updated

I read numerous questions here and even posted one of my own attempts to figure this out ( My previous question ). Unfortunately, none of them answers my question. My file .Settingsgets reset whenever I deploy the update through ClickOnce. I thought ClickOnce should have handled similar things for me, but since it seems not, I applied .Upgrade()using the settings icon:

if (Settings.Default.MustUpgradeSettings)
        {
            Settings.Default.Upgrade();
            Settings.Default.MustUpgradeSettings = false;
            Settings.Default.Save();
        }

What am I checking OnLoad(). Am I missing something? It seriously turns me nuts!


I also posted this on MSDN, HERE , and they help even less, then SO for now. I just know that in the end I will get an “egg and my face in the arrangement” when it is all over, I just want someone to be able to point this out for me ...

+5
source share
2 answers

I believe that he should do this, at least from what I read here.

http://msdn.microsoft.com/en-us/library/ms228995.aspx

, ClickOnce , ClickOnce . , ( ) , , .

+1

FYI: . , , (MustUpgradeSettings , , Upgrade . GetPreviousSettings . , .

DIY

-1

All Articles