dotnet / dotnet/msbuild

Do not validate nullable annotations when targeting .NET Framework

Open
#12,726 0 comments 0 reactions 0 assignees View on GitHub
backlog triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.