Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to preserve app.config between ClickOnce app updates?

Tags:

c#

clickonce

My ClickOnce app includes an app.config file, which the app does modify according to the user's preferences. It appears, though, that every time my clients get a new version of the app, the app.config file gets reset to its original state.

Is there any way to preserve the app.config file between ClickOnce updates?

like image 696
Shaul Behr Avatar asked Mar 30 '11 12:03

Shaul Behr


1 Answers

The app.config is used to store application configurations. For user custom configurations you should be using a .settings file.

The only way I know to keep the user app config is to save a copy of the file before publishing and, post publishing, replace the

publish_dir/version_dir/app.config.deploy

with the copy.

like image 120
dcarneiro Avatar answered Sep 28 '22 09:09

dcarneiro