Skip to content
aaronontheweb avatar

Package Management

Manage NuGet packages through dotnet CLI commands with Central Package Management and shared version variables.

CCM score
65 of 100
skills.sh installs
635
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Central Package Management setup in Directory.Packages.props, project references without versions, and the dotnet add, remove, list, and restore command set
  • Includes a command reference for adding, removing, listing outdated, vulnerable, and deprecated packages, plus restore and cache-clearing troubleshooting
  • Enforces a rule against editing .csproj or Directory.Packages.props XML by hand, and requires exact versions rather than version ranges
  • Designed for .NET solutions with many related packages, such as Akka.NET, Aspire, and OpenTelemetry, that should share one version variable

Install

$ npx -y skills add aaronontheweb/dotnet-skills --skill package-management -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

NuGet Package Management

When to Use This Skill

Use this skill when:

  • Adding, removing, or updating NuGet packages
  • Setting up Central Package Management (CPM) for a solution
  • Managing package versions across multiple projects
  • Troubleshooting package conflicts or restore issues

Golden Rule: Never Edit XML Directly

Always use dotnet CLI commands to manage packages. Never manually edit .csproj or Directory.Packages.props files.

# DO: Use CLI commands
dotnet add package Newtonsoft.Json
dotnet remove package Newtonsoft.Json
dotnet list package --outdated

# DON'T: Edit XML directly
# <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

Why:

  • CLI validates package exists and resolves correct version
  • Handles transitive dependencies correctly
  • Updates lock files if present
  • Avoids typos and malformed XML
  • Works correctly with CPM

Central Package Management (CPM)

CPM centralizes all package versions in one file, eliminating version conflicts across projects.

Enable CPM

Create Directory.Packages.props in solution root:

Details

Repository
github.com/aaronontheweb/dotnet-skills
Category
.NET & C#
First seen
Jun 3, 2026

Questions

Is the package-management skill in the top 100 of the .NET & C# category?

The package-management skill ranks in the top 100 on the .NET & C# category page on Claude Marketplaces. Its own guidance centers on managing NuGet packages through dotnet CLI commands and Central Package Management, not hand editing project XML.

How do I install the package-management skill?

Run npx -y skills add aaronontheweb/dotnet-skills --skill package-management -y in a project to install the package-management skill. Once installed, the agent can add, remove, list, and restore NuGet packages with dotnet commands instead of editing csproj or Directory.Packages.props files.

What does the package-management skill let an agent do with NuGet packages?

The package-management skill covers adding, removing, and updating NuGet packages, setting up Central Package Management so versions live in one Directory.Packages.props file, and sharing version variables across related packages like Akka.NET or OpenTelemetry. It also explains when Central Package Management is a poor fit, such as legacy projects or version ranges.

Does the package-management skill work with Central Package Management in .NET?

The package-management skill is built around Central Package Management, showing how to enable ManagePackageVersionsCentrally and reference packages without versions in project files. It lists the minimum .NET SDK, NuGet, and Visual Studio versions that CPM needs.

More from aaronontheweb/dotnet-skills

All 34

Similar to Package Management

More .NET & C#