Alex Rivera | Logout

When using a Settings.settings file in .NET, where is the config actually stored?

Asked 2009-07-02T15:55:23.357
118

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 it's stored... any ideas?

Edit
Report

2 Answers

113

It depends on whether the setting you have chosen is at "User" scope or "Application" scope.

User scope

User scope settings are stored in

C:\Documents and Settings\ username \Local Settings\Application Data\ ApplicationName

You can read/write them at runtime.

For Vista and Windows 7, folder is

C:\Users\ username \AppData\Local\ ApplicationName

or

C:\Users\ username \AppData\Roaming\ ApplicationName

Application scope

Application scope settings are saved in AppName.exe.config and they are readonly at runtime.

answered 2009-07-02T16:19:31.960
0

Two files: 1) An app.config or web.config file. The settings her can be customized after build with a text editer. 2) The settings.designer.cs file. This file has autogenerated code to load the setting from the config file, but a default value is also present in case the config file does not have the particular setting.

answered 2009-07-02T16:08:24.500

Your Answer