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

Adam Haile picture Adam Haile · Jul 2, 2009 · Viewed 117.7k times · Source

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?

Answer

SolutionYogi picture SolutionYogi · Jul 2, 2009

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.