Closed KlausLoeffelmann closed 1 month ago
@KlausLoeffelmann In RC 1 and VB much of this is not working. The auto fixes add extra document comments, which case issues that VS reports or the fixer crashes. After adding the annotation manually the errors don't go away and ignoring the errors with severity none AFTER annotation does nothing. I reported this via Visual Studio feedback because none of the an available issue categories in Repo seemed correct.
When we author Controls, Custom Controls or User Controls, we also introduce Properties. Whenever we introduce Properties, we need to be aware, that those Properties are the Interface for all sorts of Data, which might also be available already at Design Time. The Developer of a Control therefore always should ensure to implement a property according for Best Practice to avoid unnecessary Code Generation, accidental serialization of data into resource files or serialization of nested Object graphs, which cannot correctly roundtrip.
To this end, we want to introduce Analyzers to help guide this process:
DesignerSerializationVisibilityAttribute
DefaultValue
attribute or the methodsShouldSerialize[PropertyName]
andReset[Propertyname]
.