package-management

Manage NuGet packages centrally with CPM and the dotnet CLI.

1.1k|101|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/Aaronontheweb/dotnet-skills --skill package-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: package-management
Source: https://github.com/Aaronontheweb/dotnet-skills/tree/main/skills/package-management
Command: npx skills add https://github.com/Aaronontheweb/dotnet-skills --skill package-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers manage NuGet packages centrally using CPM and the dotnet CLI.

Core Features & Use Cases

  • Centralizes package versions via Directory.Packages.props.
  • Uses the dotnet CLI to add, remove, and list packages without editing XML directly.
  • Enforces consistent versioning across multi-project solutions via Shared Version Variables and CPM.

Quick Start

Use CPM to centralize NuGet versions, reference packages in projects without versions, and perform package operations via the dotnet CLI.

  • Create Directory.Packages.props and define PackageVersion entries.
  • Reference packages in your csproj files without Version attributes.
  • Commands: dotnet add package <name>, dotnet remove <name>, dotnet list package, dotnet restore.

Frequently Asked Questions about package-management

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

FAQPage Schema
How do I manage NuGet packages centrally in a multi-project solution?

Central NuGet package management uses Directory.Packages.props to define versions and the dotnet CLI to add, remove, or list packages across all projects without manual XML edits. This enforces consistent versioning throughout your solution.

What is Directory.Packages.props and how does central package management work?

Directory.Packages.props is an MSBuild file used in central package management (CPM) to define NuGet PackageVersion entries. Projects reference these packages without version attributes, ensuring consistent versions and enabling bulk updates across the entire solution.

Do I need to manually edit XML when adding NuGet packages with CPM?

No, central package management discourages manual XML edits. You use the dotnet CLI with commands like dotnet add package and dotnet remove package to perform operations directly, relying on Directory.Packages.props to handle the versioning centrally.

Can I use the dotnet CLI to update NuGet package versions across multiple projects?

Yes, using the dotnet CLI with CPM allows you to manage and update NuGet package versions across multiple projects. By centralizing versions in Directory.Packages.props, you ensure consistent versioning and resolve conflicts across your solution.

What are the limitations of using CPM for NuGet dependency management?

CPM requires your solution to use Directory.Packages.props for central versioning and relies on the dotnet CLI for operations. It is designed for multi-project solutions where consistent package versions matter, and may not suit projects needing individual version control.