VS Settings.settings Designer always resets serializeAs attribute to "String" - How to prevent?
I'd like to save a custom setting to app.config and still be able to add new settings through the Settings.settings designer in Visual Studio.
However, the custom property is stored in app.config with the serializeAs="Xml"
attribute and looks quite weird when it is converted to String, which is what the designer does by default.
Everytime the designer is opened, it resets the attribute to "String"
and messes up the content.
Does anyone know how to prevent this? How is it even possible to store custom settings with other serialization t开发者_运维问答ypes if the designer breaks them constantly?
Adding SettingsSerializeAsAttribute
to the Settings.Designer.cs file is of course fruitless, because the designer (like every designer) doesn't even look if something has changed in there and simply overwrites it...
Thanks in advance for any answers!
精彩评论