Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How to retain application settings in the xml config file (?.config) in every installation?

Posted on 2012-08-30
Medium Priority
Last Modified: 2013-12-16
Hi experts
I am writing an application in C# .NET 3.5, Winform. I have one setting stored in the application settings (under 'Settings.settings'). These settings are saved in an xml config file.

Upon every new installation, the content in the xml config file is overwritten. But there is one particular setting I would like to keep. Is it possible to do that?

Thanks in advance.
Question by:dominicwong
  • 4
  • 2
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38354980

it toally depends on the Installation program you are using!

You need to do some settings in the Installation program, so that it won't remove while uninstalling and it won't overwrite when installing!!!

Hope it helps u...

Author Comment

ID: 38359589
Thanks roopeshreddy.
I am not sure whether you meant the setting 'RemovePreviousVersions'.

What I want is to keep only the 'Settings.settings' but remove the other things. It is because I still want user to install a new version on top of an old version. The only thing I would like to keep is the 'Settings.settings'.
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38359908

No! That option will remove or retain the entire version!

You are looking for particular file, so you may need to set that option for specific file only!

Moreover, which Installation program are you using?
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

ID: 38359911
I am using VS2008. The installer project is part of the standard VS2008 template.

Accepted Solution

dominicwong earned 0 total points
ID: 38375226
Seems like MSI overwrites it automatically. There is one possible way:

Author Closing Comment

ID: 38408684
close question due to lack of response

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question