Migrating Csharp Nullable References

Enable nullable reference types in a C# project and systematically resolve all warnings. Use when adopting NRTs in existing codebases, performing file-by-file or project-wide nullable migration, fixing CS8602/CS8618/CS86xx warnings, annotating APIs for nullability, cleaning up null-forgiving operators, or upgrading dependencies with new nullable annotations. Also use when the user asks to "enable nullable", "turn on NRTs", "annotate for nullability", "fix nullable warnings", or "migrate to nullable reference types". DO NOT USE FOR: projects already fully migrated with zero warnings (unless auditing suppressions), fixing a handful of nullable warnings in code that already has NRTs enabled, suppressing warnings without fixing them, C# 7.3 or earlier projects. INVOKES: Get-NullableReadiness.ps1 scanner script.

Microsoft d7372c9 6 files · 71.2 KB Updated 2.7k repo stars

File contents

microsoft/upgrade-agent-plugins/tree/main/plugins/upgrade-agent/upgrade/dotnet/skills/lazy/common/migrating-csharp-nullable-references commit d7372c918e

Frequently asked questions

npx skillmds@latest add microsoft/migrating-csharp-nullable-references