I have an application that uses a custom configuration section for user settings. This was done so, instead of using settings files so that settings could be centralized in one app.config application for the program, instead of having one project, as by default for settings files.
The problem is that these user settings are configured for each user and are lost when the user updates the software (a new folder is created for the new version of the assembly, and the old folder is no longer used). So, I need a way to transfer these parameters either during the upgrade or when I first launch the application on the user after the upgrade. I saw the information on Settings.Upgrade () , but this only works in the settings section of the configuration file. I looked through the documentation for ConfigurationSection (from which the user settings class / section is extracted) and it seems like nothing useful. Using the ConfigurationManager to set custom installer settings for their migration seems to be deadlocked, as OpenExeConfiguration overloads do not support specifying both the executable and user level.
Any clues? The information stored is not critical (remember about the geometry of the window and layout settings, mainly), but it can be annoying to lose each time the application is updated. The only thing I can think of is to abandon the configuration mechanism of these parameters as a whole and implement my own model for storing these parameters in the updated version files in the user's AppData (where I store several other user files). I would prefer this to be the last option, as you lose a lot by refusing app.config wrappers.
source share