convert-to-cpm

Convert .NET projects to NuGet Central Package Management using Directory.Packages.props.

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/adinj00/player-performance --skill convert-to-cpm-adinj00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convert-to-cpm
Source: https://github.com/adinj00/player-performance/tree/main/.agents/skills/convert-to-cpm
Command: npx skills add https://github.com/adinj00/player-performance --skill convert-to-cpm-adinj00

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Package versions scattered across many .csproj, .fsproj, and .vbproj files drift out of sync, causing version conflicts and making upgrades painful. This Skill migrates .NET projects and solutions to NuGet Central Package Management (CPM), centralizing all package versions into a single Directory.Packages.props file. ## Core Features & Use Cases - Automated CPM Conversion: Audits all PackageReference items, creates Directory.Packages.props with PackageVersion entries, and strips Version attributes from project files while preserving conditions and other attributes. - Version Conflict Resolution: Detects packages with differing versions across projects and guides the user through resolution strategies (align to highest, VersionOverride) with per-conflict decisions. - Baseline Validation & Reporting: Captures pre- and post-conversion builds with binlogs and package list snapshots, then produces a shareable convert-to-cpm.md report with comparison tables, risk assessment, and follow-up items. - Use Case: A repository with 15 projects referencing System.Text.Json at three different versions can be converted so all versions are governed centrally, with conflicts resolved explicitly and a full audit trail for the pull request. ## Quick Start Convert my solution MyApp.sln to NuGet Central Package Management and generate a conversion report.

Frequently Asked Questions about convert-to-cpm

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

FAQPage Schema
How do I convert a .NET solution to Central Package Management?

Run the conversion against your .sln or .slnx file: the skill audits all PackageReference items, creates a Directory.Packages.props with PackageVersion entries, and removes Version attributes from project files. It validates with a clean restore and build, then produces a comparison report.

How do I resolve NuGet package version conflicts across multiple projects?

Each conflict is presented individually with the affected projects and versions found. You choose per conflict: align to the highest version in use, align to the lowest, or keep differences via VersionOverride in specific project files.

Can I use Central Package Management with packages.config projects?

No, CPM only works with PackageReference-format projects. Projects using packages.config must first be migrated to PackageReference using Visual Studio's built-in migration or dotnet migrate tooling before conversion.

Does CPM conversion change my package versions?

The conversion never upgrades any package beyond the highest version already in use across the scope. A baseline package list is compared against the post-conversion list, and any resolved version changes are reported in the convert-to-cpm.md report.

What do NU1008 and NU1010 errors mean after enabling CPM?

NU1008 means a PackageReference still has a Version attribute, which must be removed or converted to VersionOverride. NU1010 means a PackageReference lacks a corresponding PackageVersion entry in Directory.Packages.props, which must be added.

How are MSBuild version properties handled during CPM conversion?

Properties used only for package versions can be inlined as literal versions in Directory.Packages.props and then removed, or kept and referenced from Directory.Packages.props. Properties used elsewhere or defined outside the conversion scope are preserved and flagged.