migrate-nullable-references

Enable Nullable Reference Types and migrate C# code with zero-runtime changes.

2|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/sayedihashimi/copilot-skill-eval --skill migrate-nullable-references-sayedihashimi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-nullable-references
Source: https://github.com/sayedihashimi/copilot-skill-eval/tree/main/examples/aspnet-razor-pages/plugins/dotnet-skills/dotnet-upgrade/skills/migrate-nullable-references
Command: npx skills add https://github.com/sayedihashimi/copilot-skill-eval --skill migrate-nullable-references-sayedihashimi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enable nullable reference types in an existing C# codebase and systematically resolve all warnings. The migration outcome is a project where <Nullable>enable</Nullable> is set, nullable warnings are eliminated, and public API surfaces are annotated for consumers and compiler checks.

Core Features & Use Cases

  • Stepwise readiness evaluation and rollout planning for NRT migration across multi-project solutions.
  • Guidance for dereference warning fixes, API surface annotation, and suppressions cleanup.
  • Suitable for libraries, applications, and DTOs where nullability contracts matter across modules.

Quick Start

Begin by running the migrate-nullable-references skill to generate a safe, guided NRT migration plan for your codebase.

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 nullable reference types in an existing C# codebase?

To enable nullable reference types in C#, set <Nullable>enable</Nullable> in your project file and systematically resolve all compiler warnings. This migration process involves fixing dereference warnings, annotating API surfaces, and cleaning up suppressions to achieve full null-safety.

What is the best way to migrate large multi-project C# solutions to nullable reference types?

Migrating large C# solutions to nullable reference types requires a stepwise rollout strategy. Evaluate readiness first, enable NRT across core libraries, commit safely after each logical boundary, and run thorough builds to ensure compatibility with existing tests before broader modules.

How do I fix nullable warnings and annotate public APIs in C# without runtime changes?

Fix nullable warnings by resolving dereferences, annotating declarations, and applying nullable attributes to public APIs. This static-analysis migration ensures zero-runtime changes while providing compiler checks and clear nullability contracts for consumers.

Does enabling nullable reference types in C# affect existing tests and runtime behavior?

Enabling nullable reference types is a compile-time static-analysis feature that results in zero-runtime changes. However, you must run thorough builds during migration to ensure your existing tests and code compatibility remain intact across all modules.

When should I clean up nullable suppressions during a C# NRT migration?

Clean up nullable suppressions after fixing dereference warnings and annotating declarations across your C# project. Apply this cleanup progressively by committing safely after each logical boundary, starting with core libraries before moving to broader modules.