Package Management
NuGet package management guide covering Central Package Management, dependency resolution, and CLI-driven version updates for .NET solutions.
- CCM score
- 51 of 100
- skills.sh installs
- 521
- GitHub stars
- 94
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers adding, removing, listing, and updating packages with
dotnetCLI commands, plus restore and cache troubleshooting - Includes a
Directory.Packages.propssetup for CPM with shared version variables grouped by Akka.NET, Aspire, OpenTelemetry, and testing packages - Enforces CLI-only edits, since hand-editing
.csprojorDirectory.Packages.propsrisks typos and malformed XML - Designed for .NET solutions with several projects that need consistent package versions, with noted limits for version ranges and older SDKs
Install
$ npx -y skills add wshaddix/dotnet-skills --skill package-management -yInstalls 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/wshaddix/dotnet-skills
- Category
- .NET & C#
- First seen
- Jun 3, 2026
More from wshaddix/dotnet-skills
All 13- Dotnet Testing Strategy632
- Dotnet Xunit632
- Modern Csharp Coding Standards603
- Csharp Wolverinefx577
- Testcontainers574
- Microsoft Extensions Dependency Injection560
- Logging Observability554
- Validation Patterns548
- Project Structure546
- Dotnet Domain Modeling543
- Serialization533
- Microsoft Extensions Configuration532
Similar to Package Management
More .NET & C#nuget-managerSkillgithub/awesome-copilot15K installsGuardrailed NuGet workflow that adds, removes, and updates package versions in .NET solutions.
convert-to-cpmSkilldotnet/skills5.1K installsCentralize NuGet package versions into Directory.Packages.props for .NET projects and solutions, with baseline and binlog validation.
project-structureSkillwshaddix/dotnet-skills546 installsGuidelines for organizing .NET solutions with .slnx files, centralized build props, and central package management.
dotnet-project-structureSkillaaronontheweb/dotnet-skills731 installsModern .NET project scaffolding covering .slnx solutions, shared build props, central package versions, SourceLink, and SDK pinning.
dotnet-nugetPlugindotnet/skills6.4K starsNuGet and .NET package management: dependency management and modernization.
dotnet-local-toolsSkillaaronontheweb/dotnet-skills579 installsManifest-pinned .NET CLI tools that restore identically across developer machines and CI pipelines.