BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Central Package Management Now Available in .NET Upgrade Assistant

Central Package Management Now Available in .NET Upgrade Assistant

The .NET Upgrade Assistant team has recently introduced a significant upgrade: the Central Package Management (CPM) feature. This new capability enables .NET developers to manage dependencies more effectively, streamlining the upgrade process and maintaining consistency across various projects within a solution. The tool is available as a Visual Studio extension and a command-line interface (CLI), making it easier for developers to transition to CPM and stay updated with the latest .NET versions.

The addition of support for Centralized Package Management in the .NET Upgrade Assistant responds to the community's need for enhanced package management solutions. A few months ago, a Reddit user shared their experience with the tool:

I used it professionally in several WPF apps, and it has worked great. The only remaining issue I had to fix was sorting out NuGet packages.

To upgrade to CPM using Visual Studio, developers can right-click a project in Solution Explorer and select the Upgrade option, then choose the CPM feature. The upgrade process allows for the selection of additional projects in the solution, promoting centralized management of package versions. Furthermore, users can enable transitive pinning for consistent dependency management and specify the centralized path for package storage.


Source: Microsoft Blog

For those who prefer command-line operations, the CLI also supports upgrading to CPM. By navigating to the solution directory in Command Prompt and executing upgrade-assistant upgrade, developers can select the projects they wish to upgrade and straightforwardly confirm their CPM settings.

Upon completion of the CPM upgrade, the .NET Upgrade Assistant consolidates package versions into a single Directory.packages.props file. This change significantly reduces redundancy and simplifies dependency tracking across projects. The tool has also improved dependency discovery by editing references directly in central files.

The introduction of CPM has received positive feedback from the community. For example, Alexander Ravenna wrote

This sounds incredibly useful! We have a solution with dozens of projects, and central package management could help us manage version upgrades a lot more easily!

The latest update for Upgrade Assistant now requires Visual Studio version 17.3 or higher, changing from the previous minimum of 17.1. This update is necessary for security reasons, so users with versions below 17.3 should upgrade. As a result, Upgrade Assistant will no longer work with versions older than 17.3.

About the Author

Rate this Article

Adoption
Style

BT