Skip to content

Add pragma to suppress all obsoletion warnings. #73292

Open
@teo-tsirpanis

Description

@teo-tsirpanis

Context: dotnet/runtime#101738

Source-generated files that use obsolete user-provided APIs will have obsoletion warnings themselves. The standard warning code can be suppressed at the start of the generated file, but if the API is obsoleted with a custom diagnostic ID, the warning cannot be easily suppressed just for that file.

To solve this, I propose to introduce a #pragma warnings disable obsolete directive that suppresses all obsoletetion warnings regardless of ID.

c.c. @RikkiGibson

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions