I Created a windows application that uses app.confing
and updates app.config
when needed. When I run the application in debug mode it's working fine, but after I created the .exe
file and installed it's not updating the app.confing
file anymore.
I unchecked the Enable the Visual Studio hosting process to no luck.
This is the code I'm trying:
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
//Updating the config values here
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");