I 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

Re: ClickOnce Deployment and the ConfigurationSection by Fabio

Fabio
Fri Oct 20 07:25:58 CDT 2006

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 200



Re: ClickOnce Deployment and the ConfigurationSection by SR

SR
Fri Oct 20 13:09:13 CDT 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
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
>
>