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.applicationsetting
sbase.upgrade.aspx)
to upgrade your settings. You can check the ApplicationDeployment.IsFirstRun
property (http://msdn2.microsoft.com/en-us/library/system.deployment.application.applicati
ondeployment.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 200
SR - 20 Oct 2006 19:09 GMT
Thank you for the response Fabio.
I have seen these articles before but a question still remains. Where do I
apply this?
Thanks,
Seth
> Hello SR,
>
[quoted text clipped - 27 lines]
>
> Workshop ".NET Present & Future" - Bari, 26 Ottobre 2006
Fabio Cozzolino - 23 Oct 2006 10:20 GMT
Hello SR,
> Thank you for the response Fabio.
>
[quoted text clipped - 4 lines]
>
> 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
SR - 23 Oct 2006 17:15 GMT
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
> Hello SR,
>
[quoted text clipped - 21 lines]
>
> Workshop ".NET Present & Future" - Bari, 26 Ottobre 2006
Fabio Cozzolino - 24 Oct 2006 08:54 GMT
Ciao SR,
> 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?
I don't think. You consider that with the online deploy, your application
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