You can make Application scope settings writable by simply adding a setter to the property definition in Settings.Designer.cs
. For instance:
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("AdminContext")]
public string DbContext
{
get { return ((string)(this["DbContext"])); }
set { this["DbContext"] = value; } }
The caveat is that the Settings.Designer.cs
is auto-generated, and therefore if you use the designer UI, your setters will be overwritten.
This works in console and web applications.