Where are the Properties.Settings.Default stored?
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
Introduction
In .NET, Properties.Settings.Default can refer to two different kinds of settings, and they are not stored in the same place. Application-scoped settings are usually stored in the application configuration file, while user-scoped settings are written to a user-specific file under the current profile directory.
Application-Scoped Versus User-Scoped
The most important distinction is scope.
Application-scoped settings:
- are read-only at runtime through the generated settings wrapper,
- are normally defined in
App.config, - and end up in the deployed
.exe.configfile.
User-scoped settings:
- can be changed at runtime,
- are usually saved with
Properties.Settings.Default.Save(), - and are stored per user rather than beside the application executable.
That is why the answer to "where are they stored?" depends on which kind of setting you mean.
Application-Scoped Settings
Application settings are stored in the application configuration file. During development this is usually App.config, and after build or deployment it becomes something like YourApp.exe.config.
Example:
These settings are intended for application configuration, not per-user preferences.
User-Scoped Settings
User-scoped settings are stored in a user-specific configuration file managed by the .NET settings system. A common pattern looks like this in code:
Those values are not written back into App.config. Instead, they go into a per-user user.config file in the user's profile area. The exact path can vary by application name, version, and runtime, but the key idea is that they are isolated from the shared application install directory.
That design allows each user to keep separate preferences such as window size, recent files, or UI settings.
Why They Seem Hard to Find
Developers often expect user settings to appear beside the executable, but they are intentionally redirected to a profile-based location. That prevents ordinary users from needing write access to the application installation folder.
So when a setting is saved at runtime and you cannot find it near the .exe, that is usually a sign you are looking at a user-scoped setting, not an application-scoped one.
Accessing and Saving Settings in Code
The generated settings wrapper makes access easy:
The Save() call matters for user-scoped settings. Without it, the updated values may exist only in memory for the current run.
A Practical Rule
If the setting is configured by the developer and shipped with the app, think config file. If the setting is changed by the user while the app is running, think user-specific storage.
That simple rule explains most of the confusion around Properties.Settings.Default.
Common Pitfalls
- Assuming all settings are stored in the same physical file.
- Expecting user-scoped settings to be written back into
App.config. - Forgetting to call
Save()after changing a user-scoped setting. - Treating application-scoped settings as if they were meant to be writable at runtime.
- Searching only beside the executable when the value is actually stored in a user-specific configuration path.
Summary
- '
Properties.Settings.Defaultcan expose both application-scoped and user-scoped settings.' - Application-scoped settings are normally stored in the application's config file.
- User-scoped settings are stored in a per-user configuration file, not beside the executable.
- Runtime changes usually apply only to user-scoped settings and should be persisted with
Save(). - The real answer depends on whether the setting is shared application configuration or a per-user preference.
Related reading
- Where can I find a NuGet package for upgrading to System.Web.Http v5.0.0.0?
- Where can I put custom classes in ASP.NET MVC?
- Where does error CS0433 Type 'X' already exists in both A.dll and B.dll come from?
- where is gacutil.exe?
- Where is HttpContent.ReadAsAsync?
- Where Is Machine.Config?
- Where is mstest.exe located?
- Where is the Application.DoEvents in WPF?

OOD Fundamentals
Master object-oriented design from first principles, SOLID, design patterns, and classic interview problems with hands-on coding.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.