package-management

Manage NuGet package versions in .NET projects via dotnet CLI and CPM.

57|7|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/seiggy/lucia-dotnet --skill package-management-seiggy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: package-management
Source: https://github.com/seiggy/lucia-dotnet/tree/main/.github/skills/package-management
Command: npx skills add https://github.com/seiggy/lucia-dotnet --skill package-management-seiggy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the management of NuGet packages within .NET projects, preventing version conflicts and simplifying updates by enforcing the use of the dotnet CLI and Central Package Management (CPM).

Core Features & Use Cases

  • Centralized Versioning: Manages all package versions in a single Directory.Packages.props file for consistency.
  • CLI Enforcement: Mandates the use of dotnet add, dotnet remove, and dotnet list commands, avoiding manual XML edits.
  • Shared Version Variables: Organizes and updates versions for related packages (e.g., Akka.NET, Aspire) efficiently.
  • Use Case: When adding a new package like Serilog.Sinks.Console to a solution, this Skill ensures it's added correctly to Directory.Packages.props and referenced without a version in the project file, maintaining CPM integrity.

Quick Start

Use the package-management skill to add the 'Newtonsoft.Json' package to your solution.

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 package versions across multiple .NET projects?

Central Package Management (CPM) allows you to manage NuGet package versions across multiple .NET projects by centralizing them in a single Directory.Packages.props file, ensuring version consistency and preventing conflicts throughout the solution.

What is the best way to add a new NuGet package using Central Package Management?

To add a new NuGet package using Central Package Management, use the dotnet CLI commands like dotnet add package. This ensures the package is correctly added to the Directory.Packages.props file and referenced without a version in the project file, maintaining CPM integrity.

Can I manually edit the Directory.Packages.props file to update package versions?

No, you should not manually edit the Directory.Packages.props file to update package versions. The package-management approach enforces the use of the dotnet CLI for adding, removing, and updating packages to prevent direct XML manipulation and maintain versioning consistency.

How do I update versions for related NuGet packages like Aspire or Akka.NET?

You can update versions for related NuGet packages by using shared version variables within the Directory.Packages.props file. This approach organizes and efficiently updates version groups for ecosystems like Aspire or Akka.NET, ensuring all related packages stay synchronized.

Why does my NuGet restore fail after enabling Central Package Management?

NuGet restore failures after enabling Central Package Management often stem from version conflicts or incorrect references in the Directory.Packages.props file. The skill provides troubleshooting guidance to resolve these restore failures and identify conflicting package versions.

Do I need the dotnet CLI to use Central Package Management in .NET projects?

Yes, you need the dotnet CLI to use Central Package Management in .NET projects. The system mandates the use of dotnet add, dotnet remove, and dotnet list commands to facilitate package management and enforce consistent versioning without direct XML manipulation.