I have a windows application that uses an assembly that stores some configuration settings in the default application settings.
The settings can be changed in run time and are persisted thus:
Properties.Settings.Default.SelectedCOMPort = options.SelectedCOMPort;
Properties.Settings.Default.Save();
The settings are saved correctly and I confirm this by looking at the user.config file saved in the users application directory E.g.
C:\Documents and Settings\e399536\Local Settings\Application Data\MyCompany\MyTool
However when the tool is closed and then started again all the settings are loaded with their default values.
Checking the user.config file once the application is running confirms that the settings are still as saved.
The settings are loaded thus:
options.SelectedCOMPort = Properties.Settings.Default.SelectedCOMPort;
Why are the default settings being used and not the saved ones?
Have I missed something??
@ Tenaciouslmpy The settings are loaded during the constructor of the assembly, which itself is loaded in the form load event of the main assembly.
@ Austin This is a standalone app that I am debugging in Visual Studio.