Questions tagged [settings.settings]

Settings.settings is a configuration file in .NET Windows Forms applications. It is used to store application-specific settings which are persisted between user sessions.

Settings consist of four properties (Name, Type, Scope and Value) which can be used to persistently store application specific information between user session.

152 questions
99
votes
2 answers

Settings.settings vs. app.config in .NET desktop app

Possible Duplicate: What is the difference between app.config file and XYZ.settings file? I am quite confused by the apparent redundancy of these two mechanisms in Visual Studio to store and manage desktop application settings: You can use the…
CesarGon
  • 15,099
  • 6
  • 57
  • 85
53
votes
3 answers

How to persist changes in a .settings/.config file across a file version change?

I have created an application that uses settings.settings to store some user specific settings (scope=User). Settings are loaded correctly on startup, changed during use and saved correctly for next launch. This cycle appears to have no…
InvertedAcceleration
  • 10,695
  • 9
  • 46
  • 71
24
votes
8 answers

When to use .NET Settings vs config ?

Are there any recommendations on when to use Application settings (not per user settings) vs. .config file ? Update Looking to understand some of the finer and important differences because they're both effectively key/value stores.…
John K
  • 28,441
  • 31
  • 139
  • 229
18
votes
3 answers

Modifying application settings in unit tests

I have a class library I want to unit test using Microsofts unit test framework. Some of the classes I want to test are configured using application settings. These settings are defined inside the Settings.settings file having application scope and…
Martin Liversage
  • 104,481
  • 22
  • 209
  • 256
17
votes
3 answers

The current configuration system does not support user-scoped settings

I'm trying to use a settings file to store the user preferences when he/she logins on the application. I defined them as user (scope) but I am getting System.Configuration.ConfigurationErrorsException: The current configuration system does not…
chris05
  • 735
  • 4
  • 13
  • 27
17
votes
5 answers

C#: How to make sure a settings variable exists before attempting to use it from another assembly?

I have the following: using CommonSettings = MyProject.Commons.Settings; public class Foo { public static void DoSomething(string str) { //How do I make sure that the setting exists first? object setting =…
michael
  • 14,844
  • 28
  • 89
  • 177
17
votes
1 answer

Store String Array with Values in Application Settings

I've modified my Settings.settings file in order to have system_Filters be a System.String[]. I would like to populate this variable within the Visual Studio designer and not from within the code. I can get it to work within the code using the…
14
votes
4 answers

add custom type in settings.settings

I would like to use configuration file .settings to save this struct: struct sR22Protocole { Int32 inputkey; Int32 outputkey; Int32 voltage; Int32 Ohm; Int32 Correction; }; In the settings designer, I can add different type but…
Mr.Alexz
  • 313
  • 1
  • 2
  • 11
12
votes
6 answers

WPF application settings - resetting a single property

There is a way to reset application settings with Settings.Default.Reset() Is there a way to reset only one property? Something like Settings.Default.Properties["MyPropertyName"].Reset();
nikita
  • 181
  • 1
  • 6
9
votes
2 answers

Trouble saving a collection of objects in Application Settings

I'm trying to store a collection of custom objects in the Application Settings. With some help from this related question, here is what I currently have: // implementing ApplicationSettingsBase so this shows up in the Settings designer's // browse…
Evan
  • 4,450
  • 10
  • 40
  • 58
9
votes
3 answers

Properties.Settings has no setter

I decided to use Properties.Settings to store some application settings for my ASP.net project. However, when trying to modify the data, I get an error The property 'Properties.Settings.Test' has no setter, since this is generated I have no idea…
clifford.duke
  • 3,980
  • 10
  • 38
  • 63
8
votes
2 answers

Where should I store my application data?

I have an application that needs to store data. Currently, I am using the built-in Application Settings to do it, but it only gives me two choices: application and user scopes. Ideally, I want a "local" scope that allows the application to run…
ATL_DEV
  • 9,256
  • 11
  • 60
  • 102
7
votes
3 answers

Visual Studio generates "Settings1.Designer.vb" when I change a configuration setting

Sometimes (not always), when I edit a setting in the "My Project" page, when I add one or edit a value from there, I get an error : 'Settings is ambiguous between declaration in Modules '.My.MySettingsProperty' and…
thomasb
  • 5,816
  • 10
  • 57
  • 92
7
votes
4 answers

Properties.Settings is not the value I expect it to be

I have a setting in my project that, when referenced from code (i.e. i hover over the object I can see the value), is not the same as what is in the Properties.Settings file. It is an old value. I can go to the settings editor and update the value…
Brad
  • 11,934
  • 4
  • 45
  • 73
7
votes
2 answers

C# Settings File: Why do I have to use Settings.Default?

I'm just wondering why it's Settings.Default. instead of just Settings.?
michael
  • 14,844
  • 28
  • 89
  • 177
1
2 3
10 11