Greetings StackOverflow,
In past projects I've gotten used to using the Settings Designer in Visual Studio to make settings files. This has worked well in the past. In my latest project I have a desire to have multiple version, a.k.a. profiles, of the same Settings class, one with production/default values for all the properties and one with test values.
While in search to see if this is possible I noticed that in the XML for the Settings.settings file there are multiple hints that having multiple setting profiles might be possible. For instance in the Settings.settings file the <SettingsFile>
tag has a CurrentProfile
attribute which is always set to CurrentProfile="(Default)"
. Inside of that tag there is an empty tag called <Profile />
. Lastly the <Value>
tag for each setting has a Profile
attribute that usually shows Profile="(Default)"
.
Now, I've tried looking to what the <Profile />
tag is all about and whether I can use it for something but none of my searches have come up with anything.
Ultimately I want to know whether there is a way to have different profiles of the same Settings class, each with it's own default values, so that I can use it might show up like this in my code:
Properties.Settings defaultSettings = Properties.Settings.Default;
Properties.Settings testSettings = Properties.Settings.Test;
If anyone knows where to find the XML Schema for the settings file or if what I am asking for is possible please let me know.