I am trying to change some user settings for a configuration file in my WPF application, but it only works partially. The value changes correctly, and the program works fine with the value. I can even restart the program, and the value is still the one to which I changed it. The problem is that when I open the .exe.config file, the value is still old. I use this code to change the value:
Properties.Settings.Default.ProjectNumber = varTestExample;
Properties.Settings.Default.Save();
Where does this save code save the changes and how / where does the program read the value after running this code? If I run a clean version of the program, the ProjectNumber value will be correctly taken from the .exe.config file, and if I change the value in the configuration file, this will also change when the program starts. But as soon as I run the above code, the program does not read the value from the configuration file. Why?
source
share