|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ClickOnce Deployment and the ConfigurationSectionI have created an application that stores my configuration settings using
the ConfigurationSection, ConfigurationElements, and ConfigurationElementCollection. Due to the complexity of my configuration (hence the collection piece) I did not try using the settings API. I have now gotten to the point where I need to worry about deployment and updates. ClickOnce deployment works great except for the fact that everytime my application gets updated, the settings will get lost. Is there a way to use ConfigurationSection along with ClickOnce and get the settings transferred on an update? Or do I need to investigate another method of updating or store my settings in another manner? TIA Seth Hello SR,
> Is there a way to use ConfigurationSection along with ClickOnce and try to use the ApplicationSettingsBase.Update() method (http://msdn2.microsoft.com/en-us/library/system.configuration.applicationsettingsbase.upgrade.aspx) > get the settings transferred on an update? Or do I need to > investigate another method of updating or store my settings in another > manner? > to upgrade your settings. You can check the ApplicationDeployment.IsFirstRun property (http://msdn2.microsoft.com/en-us/library/system.deployment.application.applicationdeployment.isfirstrun.aspx) and then execute ApplicationSettingsBase.Update(): if (ApplicationDeployment.CurrentDeployment.IsFirstRun) { ApplicationSettingsBase.Update(); } > TIA HTH> > Seth > ------ Fabio Cozzolino Microsoft MCAD.NET DotNetSide Community Manager Blog: http://dotnetside.org/blogs/fabio Workshop ".NET Present & Future" - Bari, 26 Ottobre 2006 Thank you for the response Fabio.
I have seen these articles before but a question still remains. Where do I apply this? Thanks, Seth <Fabio Cozzolino> wrote in message Show quote news:503cdce5415f8c8c26acbb49339@news.microsoft.com... > Hello SR, > >> Is there a way to use ConfigurationSection along with ClickOnce and >> get the settings transferred on an update? Or do I need to >> investigate another method of updating or store my settings in another >> manner? >> > > try to use the ApplicationSettingsBase.Update() method > (http://msdn2.microsoft.com/en-us/library/system.configuration.applicationsettingsbase.upgrade.aspx) > to upgrade your settings. You can check the > ApplicationDeployment.IsFirstRun property > (http://msdn2.microsoft.com/en-us/library/system.deployment.application.applicationdeployment.isfirstrun.aspx) > and then execute ApplicationSettingsBase.Update(): > > if (ApplicationDeployment.CurrentDeployment.IsFirstRun) > { > ApplicationSettingsBase.Update(); > } > >> TIA >> >> Seth >> > > HTH > ------ > Fabio Cozzolino > Microsoft MCAD.NET > DotNetSide Community Manager > Blog: http://dotnetside.org/blogs/fabio > > Workshop ".NET Present & Future" - Bari, 26 Ottobre 2006 > > Hello SR,
> Thank you for the response Fabio. Hi SR,> > I have seen these articles before but a question still remains. Where > do I apply this? > > Thanks, > > Seth > sorry for my bad response. When you install a new version of your application with ClickOnce, ApplicationSettingsBase automatically upgrade settings for you at the point settings are loaded. It is very strange that doesn't work for you. Is your application deployed as Online or Online/Offline? ------ Fabio Cozzolino Microsoft MCAD.NET DotNetSide Community Manager Blog: http://dotnetside.org/blogs/fabio Workshop ".NET Present & Future" - Bari, 26 Ottobre 2006 It is online.
Does it have anything to do with the fact that I have custom configuration settings using the System.Configuration methods and objects? Seth <Fabio Cozzolino> wrote in message Show quote news:503cdce54afb8c8c4ac50bdf305@news.microsoft.com... > Hello SR, > >> Thank you for the response Fabio. >> >> I have seen these articles before but a question still remains. Where >> do I apply this? >> >> Thanks, >> >> Seth >> > > Hi SR, > sorry for my bad response. When you install a new version of your > application with ClickOnce, ApplicationSettingsBase automatically upgrade > settings for you at the point settings are loaded. It is very strange that > doesn't work for you. Is your application deployed as Online or > Online/Offline? > > ------ > Fabio Cozzolino > Microsoft MCAD.NET > DotNetSide Community Manager > Blog: http://dotnetside.org/blogs/fabio > > Workshop ".NET Present & Future" - Bari, 26 Ottobre 2006 > > Ciao SR,
> It is online. I don't think. You consider that with the online deploy, your application > > Does it have anything to do with the fact that I have custom > configuration settings using the System.Configuration methods and > objects? is not installed on client. This mean that no files are copied on client machine. Therefor you lose changes at your local settings when shut down your application. There is no way to change this. In my opinion, you can only deploy with online/offline capabilities. HTH ------ Fabio Cozzolino Microsoft MCAD.NET DotNetSide Community Manager Blog: http://dotnetside.org/blogs/fabio Workshop ".NET Present & Future" - Bari, 26 Ottobre 2006 |
|||||||||||||||||||||||