I am developing a .NET 3.5 Windows Forms app. I have two projects, the UI and a Library.
UI uses strongly typed settings that are stored, as usually, in the app.config file. I read them using UI.Properties.Settings class (generated by Visual Studio).
Library uses its own strongly typed Settings (the Settings.settings file that is dumped into Library.config file).
At runtime, Library settings will not reload from the Library.config file. Only UI.config file is read by the runtime. So I am stuck with default settings in Library assembly, and cannot provide values after deployment.
To summarize: for an application assembly that is not the main executable, the settings are not read at assembly load time.
I know I can use ConfigurationManager.AppSettings["value"] and this will read from the default app config file (UI.config) but what can I do if I want strongly typed settings (read with Properties.Settings class)?
Library.Properties.Settings.Default.Reload() won't do it.