applicationsettingsbase

Saving user scoped settings (ApplicationSettingsBase)

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-15 20:24:54
问题 I am trying to get my application settings to save when a user exits a configuration form (not my mainform). It will keep the settings in memory because when I open the form again, it will have my data that I configured still there, but it will not save it to disk. This is the filepath it is saving the xml file to C:\Users\david_000\AppData\Local[company name][project name]\1.0.0.0. I am using [UserScopedSetting()] in my class that implements the ApplicationSettingsBase file, so it should

Saving user scoped settings (ApplicationSettingsBase)

假如想象 提交于 2020-01-15 20:19:28
问题 I am trying to get my application settings to save when a user exits a configuration form (not my mainform). It will keep the settings in memory because when I open the form again, it will have my data that I configured still there, but it will not save it to disk. This is the filepath it is saving the xml file to C:\Users\david_000\AppData\Local[company name][project name]\1.0.0.0. I am using [UserScopedSetting()] in my class that implements the ApplicationSettingsBase file, so it should

Saving user scoped settings (ApplicationSettingsBase)

旧街凉风 提交于 2020-01-15 20:18:43
问题 I am trying to get my application settings to save when a user exits a configuration form (not my mainform). It will keep the settings in memory because when I open the form again, it will have my data that I configured still there, but it will not save it to disk. This is the filepath it is saving the xml file to C:\Users\david_000\AppData\Local[company name][project name]\1.0.0.0. I am using [UserScopedSetting()] in my class that implements the ApplicationSettingsBase file, so it should

Storing generic List<CustomObject> using ApplicationSettingsBase

放肆的年华 提交于 2019-12-22 05:23:50
问题 I am trying to save a List<Foo> using ApplicationSettingsBase, however it only outputs the following even though the list is populated: <setting name="Foobar" serializeAs="Xml"> <value /> </setting> Foo is defined as follows: [Serializable()] public class Foo { public String Name; public Keys Key1; public Keys Key2; public String MashupString { get { return Key1 + " " + Key2; } } public override string ToString() { return Name; } } How can I enable ApplicationSettingsBase to store List<Foo>?

.NET ApplicationSettingsBase Should I call Upgrade() every time I load?

我们两清 提交于 2019-12-22 04:17:06
问题 We have application settings derived from ApplicationSettingsBase . When we push a new version of our app we need to call: // // Summary: // Updates application settings to reflect a more recent installation of the // application. public virtual void Upgrade(); (from the meta-data) Now there are some tricky ways to determine if your settings need to be upgraded such as this post which would seem to me to only ever upgrade your settings once. Now I could store the current version of my

.NET: ApplicationSettingsBase unreliable?

爱⌒轻易说出口 提交于 2019-12-12 03:44:50
问题 In a larger application that makes use of Application Settings, sometimes some settings are not saved. When the following code is executed, everything works fine: Properties.Settings.Default.SomeSetting.X = 42; Properties.Settings.Default.SomeSetting.Y = true; Properties.Settings.Default.Save(); But this code Properties.Settings.Default.SomeSetting.X = 42; Properties.Settings.Default.Save(); Properties.Settings.Default.SomeSetting.Y = true; Properties.Settings.Default.Save(); does call the

Storing generic List<CustomObject> using ApplicationSettingsBase

瘦欲@ 提交于 2019-12-05 07:16:12
I am trying to save a List<Foo> using ApplicationSettingsBase, however it only outputs the following even though the list is populated: <setting name="Foobar" serializeAs="Xml"> <value /> </setting> Foo is defined as follows: [Serializable()] public class Foo { public String Name; public Keys Key1; public Keys Key2; public String MashupString { get { return Key1 + " " + Key2; } } public override string ToString() { return Name; } } How can I enable ApplicationSettingsBase to store List<Foo>? Agreed with Thomas Levesque: The following class was correctly saved/read back: public class Foo {

FileNotFoundException in ApplicationSettingsBase

社会主义新天地 提交于 2019-11-26 15:26:54
When debugging an application I always get the following error when break on exception is enabled in Visual Studio. This is really bugging me, since we work with break on exception. The funny thing is, that it still works when I continue (the StringCollection is loaded). The Message is: Could not load file or assembly 'System.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. Here is the code that is causing the exception (designer generated) [global::System.Configuration

FileNotFoundException in ApplicationSettingsBase

天涯浪子 提交于 2019-11-26 04:26:07
问题 When debugging an application I always get the following error when break on exception is enabled in Visual Studio. This is really bugging me, since we work with break on exception. The funny thing is, that it still works when I continue (the StringCollection is loaded). The Message is: Could not load file or assembly \'System.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\' or one of its dependencies. The system cannot find the file specified. Here is the