![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I added some user settings to my app which caused the Settings.settings to be generated etc... and all was well and lovely and the Sun was shining. Then I changed the version number of my assembly (it had been updated, after all) and all of my settings disappeared, which was somewhat less than lovely and the clouds came rolling in. I gather the user.config file that the Properties.Settings class saves is assembly version specific. Is there any way to override that so I can retain the settings across all versions of my app? Thanks Steve |
#3
| |||
| |||
|
|
Is it that no one uses the generated Settings class and user.config file? Perhaps I'm wasting my time with this feature? Anyone have an opinion? |
#4
| |||
| |||
|
|
Is it that no one uses the generated Settings class and user.config file? Perhaps I'm wasting my time with this feature? Anyone have an opinion? Steve "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:ecZXg4XPIHA.4880 (AT) TK2MSFTNGP03 (DOT) phx.gbl... I added some user settings to my app which caused the Settings.settings to be generated etc... and all was well and lovely and the Sun was shining. Then I changed the version number of my assembly (it had been updated, after all) and all of my settings disappeared, which was somewhat less than lovely and the clouds came rolling in. I gather the user.config file that the Properties.Settings class saves is assembly version specific. Is there any way to override that so I can retain the settings across all versions of my app? Thanks Steve |
#5
| |||
| |||
|
|
Hi Steve, I use User Setting quite often, but have never tried to deal with the issue of persisting settings across versions of the application. I suspect that the best way to do this would be to use the System Registry for such settings, as it is in a well-known location that will not change, and will persist the settings as long as either your application or the user removes them. -- HTH, Kevin Spencer Chicken Salad Surgeon Microsoft MVP "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:epqM6fXQIHA.2376 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Is it that no one uses the generated Settings class and user.config file? Perhaps I'm wasting my time with this feature? Anyone have an opinion? Steve "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:ecZXg4XPIHA.4880 (AT) TK2MSFTNGP03 (DOT) phx.gbl... I added some user settings to my app which caused the Settings.settings to be generated etc... and all was well and lovely and the Sun was shining. Then I changed the version number of my assembly (it had been updated, after all) and all of my settings disappeared, which was somewhat less than lovely and the clouds came rolling in. I gather the user.config file that the Properties.Settings class saves is assembly version specific. Is there any way to override that so I can retain the settings across all versions of my app? Thanks Steve |
#6
| |||
| |||
|
|
My concern over using the registry or well know locations was with Vista security. I was unsure as to what it may or may not limit me to. Similarly, what about security policies that system administrators put in place. The user settings seemed to be a safe (Microsoft) way round this. What I've done for now is throw together my own class to wrap "ini" file functionality using an xml file. It allows me to control where the file goes and what it's called and I don't need to worry about application version numbers. I've used a "well known location" and am just hoping it won't get locked down by Vista. (It's the users Application Data folder - since, on reflection, I'm saving application data - folder locations - rather than pure user data.). I sacrifice strong typing using this method, but you can't have everything. Thanks Steve "Kevin Spencer" <unclechutney (AT) nothinks (DOT) com> wrote in message news:uRdfzsjQIHA.4740 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Hi Steve, I use User Setting quite often, but have never tried to deal with the issue of persisting settings across versions of the application. I suspect that the best way to do this would be to use the System Registry for such settings, as it is in a well-known location that will not change, and will persist the settings as long as either your application or the user removes them. -- HTH, Kevin Spencer Chicken Salad Surgeon Microsoft MVP "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:epqM6fXQIHA.2376 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Is it that no one uses the generated Settings class and user.config file? Perhaps I'm wasting my time with this feature? Anyone have an opinion? Steve "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:ecZXg4XPIHA.4880 (AT) TK2MSFTNGP03 (DOT) phx.gbl... I added some user settings to my app which caused the Settings.settings to be generated etc... and all was well and lovely and the Sun was shining. Then I changed the version number of my assembly (it had been updated, after all) and all of my settings disappeared, which was somewhat less than lovely and the clouds came rolling in. I gather the user.config file that the Properties.Settings class saves is assembly version specific. Is there any way to override that so I can retain the settings across all versions of my app? Thanks Steve |
#7
| |||
| |||
|
|
Is it that no one uses the generated Settings class and user.config file? Perhaps I'm wasting my time with this feature? Anyone have an opinion? Steve "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:ecZXg4XPIHA.4880 (AT) TK2MSFTNGP03 (DOT) phx.gbl... I added some user settings to my app which caused the Settings.settings to be generated etc... and all was well and lovely and the Sun was shining. Then I changed the version number of my assembly (it had been updated, after all) and all of my settings disappeared, which was somewhat less than lovely and the clouds came rolling in. I gather the user.config file that the Properties.Settings class saves is assembly version specific. Is there any way to override that so I can retain the settings across all versions of my app? Thanks Steve |
#8
| |||
| |||
|
|
We rolled our own configuration manager in order to sustain the settings when we do updates. We are using ClickOnce deployment, so the config file is not part of the installation, it is created by the application when you run it (if it doesn't exist), and updated thereafter. We are outputting ours as XML, putting it in the user's profile folders down under LocalSettings, where we create a folder for our application's files. Hope that helps. RobinS. GoldMail, Inc. ------------------------------------------- "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:epqM6fXQIHA.2376 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Is it that no one uses the generated Settings class and user.config file? Perhaps I'm wasting my time with this feature? Anyone have an opinion? Steve "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:ecZXg4XPIHA.4880 (AT) TK2MSFTNGP03 (DOT) phx.gbl... I added some user settings to my app which caused the Settings.settings to be generated etc... and all was well and lovely and the Sun was shining. Then I changed the version number of my assembly (it had been updated, after all) and all of my settings disappeared, which was somewhat less than lovely and the clouds came rolling in. I gather the user.config file that the Properties.Settings class saves is assembly version specific. Is there any way to override that so I can retain the settings across all versions of my app? Thanks Steve |
#9
| |||
| |||
|
|
I am sure the procedure is the same for C#, or at least similar: ' ' Check if the settings need migrating from previous version ' If My.Settings.Current = False Then My.Settings.Upgrade() My.Settings.Current = True ' Done the upgrade End If Sid. "RobinS" <robins (AT) imnottelling (DOT) com> wrote in message news:MfCdnUQ22vTBgu3anZ2dnUVZ_rWtnZ2d (AT) comcast (DOT) com... We rolled our own configuration manager in order to sustain the settings when we do updates. We are using ClickOnce deployment, so the config file is not part of the installation, it is created by the application when you run it (if it doesn't exist), and updated thereafter. We are outputting ours as XML, putting it in the user's profile folders down under LocalSettings, where we create a folder for our application's files. Hope that helps. RobinS. GoldMail, Inc. ------------------------------------------- "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:epqM6fXQIHA.2376 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Is it that no one uses the generated Settings class and user.config file? Perhaps I'm wasting my time with this feature? Anyone have an opinion? Steve "Steve Barnett" <noname (AT) nodomain (DOT) com> wrote in message news:ecZXg4XPIHA.4880 (AT) TK2MSFTNGP03 (DOT) phx.gbl... I added some user settings to my app which caused the Settings.settings to be generated etc... and all was well and lovely and the Sun was shining. Then I changed the version number of my assembly (it had been updated, after all) and all of my settings disappeared, which was somewhat less than lovely and the clouds came rolling in. I gather the user.config file that the Properties.Settings class saves is assembly version specific. Is there any way to override that so I can retain the settings across all versions of my app? Thanks Steve |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |