I have a VS2010 solution with a Settings.settings file. The user settings are saved to the Local Settings folder and this is a problem as these settings do not roam.
Currently the settings file is saved automatically to:
Dim config_initial As System.Configuration.Configuration = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.PerUserRoamingAndLocal)
Console.WriteLine("Local user config path: {0}", config_initial.FilePath)
( C:\Documents and Settings\%username%\Local Settings\Application Data\%company%\%application%.exe_Url_%hash%\%version%\user.config
)
Is there any way to save this file to the file path identified by:
Dim config_new As System.Configuration.Configuration = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.PerUserRoaming)
Console.WriteLine("User config path: {0}", config_new.FilePath)
( C:\Documents and Settings\%username%\Application Data\%company%\%application%.exe_Url_%hash%\%version%\user.config
)
I am just saving using My.Settings.Save()
or automatically when the application terminates at the moment.
I found the answer here. In Visual Studio, open the Application Settings screen, then select an individual setting, and then go to the Properties Window. There is then an option to set Roaming
to True