Skip to content

Preserve xml comments when re-generating the suppression file #28069

Open
@ViktorHofer

Description

@ViktorHofer

Today, when a suppression file already exists and is regenerated via the --generate-suppression-file or /p:GenerateSuppressionFile=true flag, xml comments applied to elements are lost. In dotnet/runtime we have comments encoded in suppression files to explain why certain suppressions are necessary.

We should explore if we can change the XmlSerializer currently used to preserve xml comments. Alternatively we could discuss if we want to support an additional output format like JSON. That would have the advantage of in-built code comment support when using a library like System.Text.Json, and the availability of a source generator which remove the dependency on reflection during serialization/deserialization.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions