(My question is similar to this one, but the code is slightly different, and the solution doesn't work for me)
I'm trying to save settings changes to the app.config
:
Dim config As System.Configuration.Configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
config.AppSettings.Settings("HistoryRootDirectoryPath").Value = p_historySavingPath
config.Save(ConfigurationSaveMode.Modified)
ConfigurationManager.RefreshSection("appSettings")
Nothing is saved neither to the exe.config
file in bin folder, and not to the actual app.config
file. What am I doing wrong?