.NET Tools
Essential productivity kit for .NET and game developers
Implicit References, Context Popup, Configuration and Deprecation Messages – NuGet Updates in Rider 2020.2 EAP
Working with NuGet is an important part of every .NET project, and therefore its integration in Rider is one of our top priorities. Previously we introduced productivity boosts like import of missing packages, the NuGet quicklist and auto-display of README files. Now we want to show you some recent additions in the latest Rider 2020.2 EAP release.
In this new version, we’ve added a new way to view implicit package references, extended the NuGet package list with a brand new context popup menu to access common operations, implemented a package search history, enhanced the config view with a property pane to manage package folders with additional validation, introduced warnings about package deprecation, and fixed several more issues along the road. We’ve also made a large number of internal refactorings to pave the way for more features and fixes to come.
Let’s get ready for some NuGet magic!
Implicit Package References
Up until now, we could use the Solution Explorer to browse NuGet packages and view the transitive dependencies and assemblies contained in these packages:
The task of investigating transitive packages becomes tedious with extensive dependency chains, and even more so if we need to see why a certain package was imported, i.e., to check which explicit package references a given transitive package.
From Rider 2020.2 we can use the NuGet tool window to see all the transitive packages of a solution or project in a new Implicitly Installed Packages section:
Hovering over implicit packages reveals a tooltip containing information about its version and the referencing package. If the package is referenced in multiple versions, they will all be shown:
Context Popup Menu
Another convenient feature we’ve added is a new context popup menu that can be invoked via right-clicking or pressing Alt-Enter on a NuGet package:
From here we can quickly access all the relevant actions for a single NuGet package, like updating or removing the package, opening it in the Assembly Explorer to examine the API, revealing it in the filesystem explorer, navigating to the related NuGet.org entry, or finding dependent code. Also remember that we can just start typing here to filter actions!
Notably, there is also a new Quick NuGet Documentation action that is more of a keyboard-driven way to bring up the implicit reference paths to a package:
This action uses the same shortcut as the existing Quick Documentation action to integrate fluently into our existing muscle memory.
Package Search History
The search box for packages also received an update. Notice the little triangle next to the magnifier? We can either click on it or use Alt/Option - Down Arrow to open the history of recent package searches:
By the way, this is also available in other search boxes, like Find/Replace in File or Find/Replace in Solution.
Specify Package Folders & Validate NuGet.config
A central part of NuGet is the configuration, which resides in NuGet.config files and works hierarchically across directories. In Rider, we already have the Sources tab in the NuGet tool window to take a glance not only at the relevant NuGet files but also at the effective configuration. In Rider 2020.2 we can now also edit values for two of the most commonly changed properties globalPackagesFolder
and repositoryPath
:
For relative values, we can see the effective path right below the text boxes. Of course we can also choose from a directory dialog, for instance to choose a folder from another disk.
When adding or changing local source feeds, it’s pretty annoying when we find out later that we put in the wrong value. In the Feeds tab we can now immediately see whether a feed path is invalid as the path will be highlighted with a red rectangle:
A warning message will also be shown in the search list if we search for a package and it is not found in any of the feeds:
Deprecation Warnings
When searching for a package in the NuGet tool window, it would be great to have a visual indication of which packages are still in maintenance or have been deprecated. The new warning in the details pane will help us:
We hope you like the new NuGet improvements! These are just the initial steps towards better NuGet integration that we plan to implement. Feel free to leave us feedback in the comments below. Download Rider or – even better – try JetBrains ToolBox to easily test new releases and leave your working environments untouched!