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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With