convert-to-cpm

Migrate .NET projects to NuGet Central Package Management via Directory.Packages.props.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates migrating .NET projects from per-project package versioning to NuGet Central Package Management (CPM), centralizing NuGet versions to improve governance and upgrades across multi-project repositories.

Core Features & Use Cases

  • Audit existing PackageReference versions and imported props to identify CPM readiness and conflicts.
  • Generate or update Directory.Packages.props and apply PackageVersion entries for all unique packages.
  • Remove Version attributes from PackageReference items or apply VersionOverride where necessary, preserving project-specific exceptions.
  • Validate by restoring, building, and capturing baseline vs post-conversion artifacts for audit (binlogs and package lists).

Quick Start

Run the CPM conversion workflow on your repository to centralize NuGet versions and verify it with a clean restore and build.

Frequently Asked Questions about convert-to-cpm

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

FAQPage Schema
How do I migrate .NET projects to NuGet Central Package Management?

To migrate to NuGet Central Package Management, the workflow audits all per-project PackageReference versions, generates a Directory.Packages.props file, removes Version attributes, and validates the build against a baseline.

What is NuGet Central Package Management and when do I need it for my repository?

NuGet Central Package Management centralizes package versions across multi-project repositories using Directory.Packages.props. You need it to improve dependency governance and simplify package upgrades across your solution.

How do I handle conflicting package versions when converting to Central Package Management?

When converting to Central Package Management and facing conflicting versions, the workflow proposes a plan using VersionOverride for project-specific exceptions or alignment strategies to standardize versions before proceeding.

Can I use Central Package Management with multi-project repositories that have imported props?

Yes, you can use Central Package Management with multi-project repositories. The workflow audits existing imported props and package references to identify CPM readiness and resolve conflicts before generating the Directory.Packages.props file.

How do I validate a clean build after migrating to Central Package Management?

Validate a clean build after migrating by restoring and building the solution, then comparing post-conversion artifacts like binlogs and package lists against a captured baseline-packages.json to ensure no regressions occurred.