Performance and Polish with NuGet 5.9
Getting started with NuGet 5.9
NuGet 5.9 is one of many releases in our .NET unification journey. Our NuGet tooling helps developers discover new .NET packages to use for their .NET applications, while making package management easier during your daily development.
NuGet 5.9 Highlights
There are many important improvements in NuGet 5.9:
- Manage solutions easier with Floating Versions Support.
- Know where your packages come from with Content Hash & Source Information.
- Quickly update your packages with Right Click -> Update….
- Be even more productive with Visual Studio Package Manager Improvements.
- See improved visuals with Polished Icons for NuGet.
Floating Versions in Solution-Level Package Manager
We heard that there were challenges when specifying floating versions in your projects, and you will now see the requested version and what version was ultimately resolved. We hope this improves your experience using floating version notation with NuGet.
Content Hash & Source Details for Packages
One challenge we’ve heard from you is knowing where your package is coming from & the specific contents of that package. Fear not, we’ve now added additional improvements into the global package folder & installation logs so you can check exactly what package source & content hash was restored by NuGet.
You can now view this information in the contents of the respective .nupkg.metadata file of the package you’re interested in.
Additionally, when installing a package, you’ll see the same information to ensure the right package was restored at install time.
Update Package Context Menu Action
We heard that you wanted the ability to quickly update packages within the solution explorer. In this release, you can now right click on package(s) you’d like to update.
This will then automatically select the packages in the package manager for you to update.
Visual Studio Package Manager Improvements
In NuGet 5.9 & Visual Studio 2019 16.9, we have continued to improve the performance of managing your project’s packages. Here is a small list of the improvements we’ve made so far that was benchmarked against the OrchardCore project that contains over 150 projects, and what you can expect soon.
- 16.7 – We made it instantaneous to switch between the installed & update tabs.
- 16.8 – We improved the performance of updating packages (upgrading/downgrading) to be up to 14x faster.
- 16.9 – We improved the performance of uninstalling packages to be up to 5x faster.
- 16.10 (Upcoming) – We improved the performance of installing packages to be up to 7x faster.
We believe with these changes, that managing your dependencies in Visual Studio will be faster than ever and we’re excited for you to try them out by updating to the latest version of Visual Studio.
New & Polished Icons in Package Manager
We’ve heard that a number of icon choices in Visual Studio didn’t quite make sense to you. In this release, we’ve improved a number of different areas.
First, we’ve changed the “Manage NuGet Packages…” context menu to have an official NuGet icon.
Next, when a package is on the latest version, many users found a down-arrow to be confusing as to whether an update is available, so we reverted a change to bring back the old green checkmark confirming you’re on the latest version of the package.
Finally, we improved the experience of deprecation icons to be a bit more reliable & appear where you need to see them the most.
NuGet 5.9 includes support for .NET 5, and therefore requires you to be using the same minor version of tooling.
It is advised to ensure that you are on the same version of tooling in your environments. Visual Studio 16.9, MSBuild 16.9, and .NET 5.0 require NuGet 5.9 or later.
One such way of ensuring you have the same version of tooling being used in your environments is to use MSBuild, Visual Studio, or the dotnet CLI. You can get started with NuGet restore in each of these scenarios in the following way:
NuGet 5.9 is a great release that brings a refined experience to everything package management. We’ve added a bunch of exciting quality of life improvements while also bringing you a more performant package management experience.
We’re excited to see you use NuGet 5.9 & include it in your toolset to build amazing things with .NET.
For more details on NuGet 5.9, see our official release notes.
Your feedback is important to us. If there are any problems with this release, check our GitHub Issues and Visual Studio Developer Community for existing issues. For new issues within NuGet, please report a GitHub Issue. For general NuGet experience issues, let us know via the Report a Problem option found in your favorite IDE under Help > Report a Problem.