Skip to content

Do not validate nullable annotations when targeting .NET Framework #12726

@tmat

Description

@tmat

Issue Description

The code base currently uses ! suppression to avoid nullable warnings.
Rather than littering the code with ! the nullability analysis should be disabled for .NET Framework targets in projects that multi-target.

Alternatively, calls to APIs like string.IsNullOrEmpty that are annotated on net10 but not on .NET Framework should be changed to null-annotated equivalents.

The editorconfig suppresses IDE0370: Suppression is unnecessary to allow unnecessary ! when not targeting .NET Framework.
This should be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions