Page 1 of 1

my.settings.upgrade not working! VB.net

Posted: Thu Oct 02, 2014 2:49 pm
by KraZy
I'm trying to run the update settings taking them from the previous version of the program, the problem is that it does not work.

I have created a field "ser" which is set to true by default, so that every time an update is made the field "ser" becomes false, in particular:
Code: Select all
 If My.Settings.ser = "True" Then
    My.Settings.Upgrade () 
    My.Settings.ser = False 
    My.Settings.Save () 
 end If
 
This should work well, it must be said that this code is executed within the form load and not in a function, it is placed first. I read in the network that the cause of why not update, it could be that the settings are part of an other version and not a equal, consequently this conflict is created that does not allow the update. I wonder how I could resolve this situation as they are really in trouble.

Re: my.settings.upgrade not working! VB.net

Posted: Thu Oct 02, 2014 2:55 pm
by CodenStuff
You shouldn't need quote marks (") around True. Try,
Code: Select all
If My.Settings.ser = True Then
    My.Settings.Upgrade () 
    My.Settings.ser = False 
    My.Settings.Save () 
end If
As long as that setting is a boolean.

Re: my.settings.upgrade not working! VB.net

Posted: Thu Oct 02, 2014 2:58 pm
by KraZy
First it was without the quotes, I thought that was not right and I added since so wrong. I saw that in appdata / local there are many folders of the same application with different settings, could this be the cause of the problem?

Re: my.settings.upgrade not working! VB.net

Posted: Thu Oct 02, 2014 3:04 pm
by CodenStuff
As long as the applications name and folder location on the computer remains the same you shouldn't have multiple appdata files....as far as I know :?

Re: my.settings.upgrade not working! VB.net

Posted: Thu Oct 02, 2014 3:14 pm
by KraZy
i have the folder (attach file).

I can not help but notice the presence of .exeUrl would be the downloaded application) and the other folder with .exeStrongName (the primary application that requires the upgrade).

Re: my.settings.upgrade not working! VB.net

Posted: Thu Oct 02, 2014 3:23 pm
by CodenStuff
Are you running this in debug mode? - if you are then that could be the issue.

Can you post your update code so I can have a look.

Re: my.settings.upgrade not working! VB.net

Posted: Thu Oct 02, 2014 3:30 pm
by KraZy
expects us not confuse the arguments lol, this is about the settings that are not updated from the previous version but does not affect the system update.

Re: my.settings.upgrade not working! VB.net

Posted: Thu Oct 02, 2014 4:07 pm
by KraZy
I run remote assistance with my client and in addition to solving the problem of the update that was not executed, the old settings were read, probably you're right with the fact that debug mode can not test such a thing. I'll do more testing and I'll tell you how it goes.

Re: my.settings.upgrade not working! VB.net

Posted: Thu Oct 02, 2014 8:06 pm
by KraZy
very strange to some people it works and others do not, there is probably something wrong, I'd love to work with you to develop a system of activation without problems.