dotnet-centralise-packages

Centralize NuGet package versions in .NET solutions via Directory.Packages.props.

6|2|Updated Aug 14, 2025
One-click install
npx skills add https://github.com/Im5tu/claude --skill dotnet-centralise-packages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-centralise-packages
Source: https://github.com/Im5tu/claude/tree/main/skills/dotnet-centralise-packages
Command: npx skills add https://github.com/Im5tu/claude --skill dotnet-centralise-packages

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Central Package Management (CPM) centralizes NuGet package versions for a multi-project .NET solution, ensuring consistent builds and simplified maintenance.

Core Features & Use Cases

  • Central Package Management: consolidates direct dependencies into a single Directory.Packages.props.
  • Build stability: resolves version conflicts by selecting the highest version globally.
  • Easy modernization: propagates version changes automatically across all projects.

Use Case: Suppose you have several projects referencing Newtonsoft.Json at different versions; CPM ensures a single, uniform version is used throughout the solution.

Quick Start

Run the skill in the solution directory to generate Directory.Packages.props and adjust csproj PackageReference entries accordingly.

Frequently Asked Questions about dotnet-centralise-packages

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

FAQPage Schema
How do I centralize NuGet package versions across multiple .NET projects?

Centralize NuGet package versions across a .NET solution by using Central Package Management to generate a Directory.Packages.props file next to the .sln file. This consolidates all direct dependencies into a single location and removes Version attributes from individual project PackageReference entries.

What is Central Package Management in .NET and when should I use it?

Central Package Management is a .NET feature that unifies NuGet package versions across a multi-project solution via Directory.Packages.props. Use it to ensure consistent builds, simplify maintenance, and resolve version conflicts by selecting the highest version globally.

How do I migrate a multi-project .NET solution to use Directory.Packages.props?

Migrate a multi-project solution by locating the .sln file, generating Directory.Packages.props next to it, creating or updating Directory.Build.props, removing Version attributes from csproj PackageReference entries, and verifying the result with dotnet build to ensure everything compiles.

Does Central Package Management handle transitive NuGet package conflicts?

Central Package Management handles direct versus transitive packages and resolves version conflicts by selecting the highest version globally across the solution. This ensures build stability and uniform dependency versions throughout all projects.

Can I use Central Package Management with an existing Directory.Build.props file?

Central Package Management works with existing Directory.Build.props files by updating them as needed during the centralization process. The skill creates or updates Directory.Build.props alongside generating Directory.Packages.props next to the .sln file.

Why do my NuGet package versions conflict across projects in a .NET solution?

NuGet package versions conflict across projects when individual csproj files reference different versions of the same package. Central Package Management resolves this by consolidating all versions into Directory.Packages.props and selecting the highest version globally to ensure uniform builds.