I have configured a boolean variable in project's settings file when I compile, in my output folder i see the variable in the .dll.config, as follows:
<setting name="ShowStats" serializeAs="String">
<value>True</value>
</setting>
In code I refer to it by Properties.Settings.Default.ShowStats
I want to be able to change my .config file and write there False or True, and to have this value reflected in runtime.
it seems that only changing it from my Settings window in Visual Studio will work in runtime.
Changing with notepad isnt working. it will always be the last value set in VS Settings window.
What am I doing wrong here?
Dlls don't actually have config files. Only the entry process has a config file. Basically: your entries need to be copied from the dll-named config file into app.config, or the exe-named config file.
Further: these values are only read at startup; if you are changing it while running, that won't do anything (unless the process chooses to restart itself by monitoring configuration - asp.net does this).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With