migrate-nullable-references

Migrate .NET projects to C# Nullable Reference Types and resolve CS86xx warnings.

5.1k|377|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/dotnet/skills --skill migrate-nullable-references
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-nullable-references
Source: https://github.com/dotnet/skills/tree/main/plugins/dotnet-upgrade/skills/migrate-nullable-references
Command: npx skills add https://github.com/dotnet/skills --skill migrate-nullable-references

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you adopt C# Nullable Reference Types (NRTs) in existing codebases, systematically resolving compiler warnings and ensuring robust nullability annotations.

Core Features & Use Cases

  • NRT Adoption: Enables and migrates projects to use <Nullable>enable</Nullable>.
  • Warning Resolution: Systematically fixes CS86xx warnings related to nullability.
  • API Annotation: Accurately annotates public API surfaces for reliable nullability information.
  • Use Case: Migrating a large, legacy .NET application to use NRTs to improve code safety and maintainability.

Quick Start

Use the migrate-nullable-references skill to enable nullable reference types for the project located at './src/MyProject.csproj'.

Frequently Asked Questions about migrate-nullable-references

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable C# nullable reference types in an existing .NET project?

Nullable reference types are a C# compiler feature that tracks null state to prevent NullReferenceException risks. This Skill automates adopting them by enabling the setting and annotating your public API surfaces for robust null-safety.

What's the best way to resolve CS86xx compiler warnings when migrating to nullable reference types?

Annotating public API surfaces involves adding nullable attributes to method signatures and properties exposed by your library. This Skill automates that annotation process to ensure reliable nullability information for consumers and systematically resolves CS86xx warnings.

Can I migrate a large legacy .NET application to use nullable reference types systematically?

Migrating a large legacy .NET application to use nullable reference types is the primary use case for this Skill. It systematically resolves CS86xx compiler warnings and enables the `<Nullable>enable</Nullable>` setting to improve code safety and maintainability.

Why does enabling nullable reference types generate so many compiler warnings?

Enabling nullable reference types generates CS86xx compiler warnings because the C# analyzer flags existing code where reference types might hold null values without explicit annotations. This Skill automates resolving these warnings by applying accurate nullability annotations.