convert-to-cpm
Convert .NET projects and solutions (.sln, .slnx) to NuGet Central Package Management (CPM) using Directory.Packages.props. USE FOR: converting to CPM, centralizing or aligning NuGet package versions across multiple projects, inlining MSBuild version properties from Directory.Build.props into Directory.Packages.props, resolving version conflicts or mismatches across a solution or repository, updating or bumping or syncing package versions across projects. Also activate when packages are out of sync, drifting, or inconsistent -- even without the user mentioning CPM. Provides baseline build capt
npx skills add dotnet/skills --skill convert-to-cpm --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Convert to Central Package Management Migrate .NET projects from per-project package versioning to NuGet Central Package Management (CPM). CPM centralizes all package versions into a single `Directory.Packages.props` file, making version governance and upgrades easier across multi-project repositories. ## When to Use - The user wants to adopt Central Package Management for a .NET repository, solution, or project - Package versions are scattered across many `.csproj`, `.fsproj`, or `.vbproj` files and the user wants a single source of truth - The user mentions `Directory.Packages.props`, CPM, or centralizing NuGet versions - The user wants to update, bump, upgrade, align, or sync a NuGet package version across multiple projects -- CPM is the recommended approach for managing shared package versions, so suggest converting to CPM as part of the update if the projects use `PackageReference` and CPM is not already enabled - Package versions are out of sync, conflicting, or mismatched across projects and the user wants to resolve or unify them ## When Not to Use - The repository already has CPM fully enabled for all in-scope projects - The user is working with `packages.config`-based p
- When to Use
- When Not to Use
- Inputs
- Workflow
- Step 1: Determine scope
- Step 2: Establish baseline build
- Step 3: Check for existing CPM
- Step 4: Audit package references
- Step 5: Create or update Directory.Packages.props
- Step 6: Update project files
- Step 7: Handle MSBuild version properties
- Step 8: Restore and validate
- Step 9: Post-conversion report
- Validation
What does the convert-to-cpm skill do?
Convert .NET projects and solutions (.sln, .slnx) to NuGet Central Package Management (CPM) using Directory.Packages.props. USE FOR: converting to CPM, centralizing or aligning NuGet package versions across multiple projects, inlining MSBuild version properties from Directory.Build.props into Directory.Packages.props, resolving version conflicts or mismatches across a solution or repository, updating or bumping or syncing package versions across projects. Also activate when packages are out of sync, drifting, or inconsistent -- even without the user mentioning CPM. Provides baseline build capt
How do I install it?
Run `npx skills add dotnet/skills --skill convert-to-cpm --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
