When using a Settings.settings file in .NET, where is the config actually stored? I want to delete the saved settings to go back to the default state, but can\'t find where
While browsing around to figure out about the hash in the folder name, I came across (via this answer):
http://blogs.msdn.com/b/rprabhu/archive/2005/06/29/433979.aspx
(edit: Wayback Machine link: https://web.archive.org/web/20160307233557/http://blogs.msdn.com:80/b/rprabhu/archive/2005/06/29/433979.aspx)
The exact path of the
user.configfiles looks something like this:
\ \ _ _ \ \user.config where
- is either the roaming profile directory or the local one. Settings are stored by default in the localuser.configfile. To store a setting in the roaminguser.configfile, you need to mark the setting with theSettingsManageabilityAttributewithSettingsManageabilityset toRoaming.
- is typically the string specified by theAssemblyCompanyAttribute(with the caveat that the string is escaped and truncated as necessary, and if not specified on the assembly, we have a fallback procedure).
- is typically the string specified by theAssemblyProductAttribute(same caveats as for company name).
and- information derived from the app domain evidence to provide proper app domain and assembly isolation.
- typically the version specified in theAssemblyVersionAttribute. This is required to isolate different versions of the app deployed side by side.The file name is always simply '
user.config'.