visual studio 2012 - Keep My.Settings Always VB.Net -
i have application , need have my.settings saved. notice cleared whenever change files location, or run on different computer. there ways prevent this. happens when application updates. thanks.
here how can retain settings thru upgrade:
(you need define project - properties - setting settings of 'applicationversion' string; can start off initial value of "not yet set")
private sub setsettingsversion() dim system.reflection.assembly = system.reflection.assembly.getexecutingassembly() dim appversion version = a.getname().version dim appversionstring string = appversion.tostring if my.settings.applicationversion <> appversion.tostring my.settings.upgrade() my.settings.applicationversion = appversionstring end if end sub
Comments
Post a Comment