I have been having a problem with the following snippet:
//Setting up AttributeDictionary
SettingsAttributeDictionary ad = new
SettingsAttributeDictionary();
UserScopedSettingAttribute usera = new
UserScopedSettingAttribute();
ad.Add(usera.GetType(), usera);
// Adding new SettingsPropery
SettingsProperty mySp= new SettingsProperty("NewProperty", typeof(String)
, new LocalFileSettingsProvider(), false, "Hello World",
SettingsSerializeAs.String, ad, true, true);
//MySettings here is just the namespace of the project
// Add Property to Properties collection and saving
MySettings.Default.Properties.Add(new
System.Configuration.SettingsProperty("AnotherProp "));
MySettings.Default.Save();
Upon saving the new Property is not reflected in the User.config file
located
C:\Users\Administrator\AppData\Local\AppName\AppNa me.exe_\1.0.0.0
Is there something I am doing wrong or is it just not designed to be used
this way as it appears that this code doesn't talk to the underlying
configuration subsystem only the settings subsystem