managing-legacy-dotnet-packages

Automate NuGet package updates, additions, and removals in .NET Framework projects.

19|2|Updated May 13, 2026
One-click install
npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill managing-legacy-dotnet-packages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-legacy-dotnet-packages
Source: https://github.com/microsoft/upgrade-agent-plugins/tree/main/plugins/upgrade-agent/extenders/upgrade-dotnet/upgrade/skills/lazy/common/managing-legacy-dotnet-packages
Command: npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill managing-legacy-dotnet-packages

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the management of NuGet packages in .NET Framework projects, simplifying updates, additions, and removals of packages.

Core Features & Use Cases

  • NuGet Package Management: Handles both packages.config and PackageReference in non-SDK-style csproj files.
  • Update, Add, Remove Packages: Manages packages.config, PackageReference, and HintPath adjustments.
  • Use Case: Quickly update a package in a .NET Framework project by modifying the packages.config file or directly in the csproj file.

Quick Start

Update the Newtonsoft.Json package to version 13.0.3 in your project.

Frequently Asked Questions about managing-legacy-dotnet-packages

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

FAQPage Schema
How do I manage NuGet packages in old .NET Framework projects?

You can manage NuGet packages in .NET Framework projects by automating updates, additions, and removals across both packages.config and PackageReference formats in non-SDK-style csproj files.

Can I update a NuGet package directly in a csproj file without using packages.config?

Yes, updating NuGet packages can be handled directly in the csproj file using PackageReference, or by modifying the packages.config file and adjusting HintPath accordingly for .NET Framework projects.

Do I need msbuild to restore and compile NuGet packages in .NET Framework projects?

Yes, msbuild is required for restoring and compiling .NET Framework projects when managing NuGet packages, ensuring dependencies are properly resolved during the build process.

What is the best way to add or remove NuGet packages in a legacy .NET Framework project?

The best way to add or remove NuGet packages in legacy .NET Framework projects is to automate the modification of packages.config or PackageReference entries and adjust HintPath in the csproj file.

Does this approach support both packages.config and PackageReference in non-SDK-style csproj files?

Yes, NuGet package management supports both packages.config and PackageReference formats within non-SDK-style csproj files for legacy .NET Framework projects.

Why do my NuGet package updates fail in legacy .NET Framework csproj files?

NuGet package updates may fail if HintPath entries in the csproj file are not adjusted correctly after modifying packages.config, or if msbuild is not used for proper package restoration.