Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

Tip: Looking for answers? Try searching our database.

ClickOnce Deployment and the ConfigurationSection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SR - 19 Oct 2006 22:16 GMT
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
Fabio Cozzolino - 20 Oct 2006 13:25 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.