dotnet-csharp-nullable-reference-types

Installation
SKILL.md

dotnet-csharp-nullable-reference-types

Nullable reference type (NRT) annotation strategies, migration guidance for legacy codebases, and the most common annotation mistakes AI agents make. NRT is enabled by default in all modern .NET templates (net6.0+), but many existing codebases still need migration.

Cross-references: [skill:dotnet-csharp-coding-standards] for null-handling style, [skill:dotnet-csharp-modern-patterns] for pattern matching with nulls.


Quick Reference: NRT Defaults by TFM

TFM <Nullable> default Notes
net8.0+ enable (in templates) New projects have NRT enabled by default
net6.0/net7.0 enable (in templates) Same as net8.0
netstandard2.0/2.1 not set Must opt in explicitly
net48 / older not set Must opt in explicitly

Important: The TFM does not enforce NRT -- the <Nullable>enable</Nullable> MSBuild property does. Legacy projects upgraded to net8.0 may not have it enabled.

Related skills

More from wshaddix/dotnet-skills

Installs
22
GitHub Stars
23
First Seen
Mar 7, 2026