Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

.net

settings

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?

like image 695
Adam Haile Avatar asked Jul 02 '09 15:07

Adam Haile


People also ask

Where are .NET settings stored?

The settings are stored in user. config. Full path: %USERPROFILE%\Local Settings\Application Data\<Company Name>\ <appdomainname>_<eid>_<hash>\<verison>\user.

Where are settings stored C#?

There is a folder called "Properties" under your project root folder, and there are *. settings file under that folder. That's where it gets stored.

Where is config file in Visual Studio?

Settings. settings is located in the My Project folder for Visual Basic projects and in the Properties folder for Visual C# projects.


1 Answers

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.

like image 114
SolutionYogi Avatar answered Oct 20 '22 09:10

SolutionYogi