Rider EAP update: Working with NuGet
There’s no way around it: .NET development today and in the future means working with NuGet for bringing dependencies into our projects. Rider lets us install, update and remove NuGet packages, and automatically restores missing packages when a project is opened. In this blog post, let’s look at what changed in our NuGet tooling since we launched public Rider EAP (Early Access Program).
When searching a NuGet package source, Rider caches and updates search results in the background. Since our first public EAP, we worked on zero-latency typing in the search box which makes searching for packages very snappy.
The quality of search results in NuGet is usually okay, but not always. In Rider, we apply custom ordering to search results based on the data we get back from the NuGet package source that is being queried and the package download count. For example when searching for
"json", Rider will show Newtonsoft.Json as the first result since that package is much more popular than other results.
Another thing we added is smart search. I would like to say that I type with ten fingers, but I’m afraid I only use three, which are sometimes out of sync – resulting in typos! Rider’s NuGet client uses the ReSharper search engine which detects many typos, skipped letters, Russian keyboard and so on. Let’s search for
"angulrajs" (note the typo):
Rider’s NuGet client also supports CamelHumps, so for example
"BeDone" will search for
We shipped Rider with a NuGet client that had three tool window panes: the list of projects in our solutions, search results, and the package description and versions. The tool window layout changed a lot in our latest EAP builds. We now have two panes instead, providing more screen real estate to manage NuGet packages. The solution/project selection was moved to a dropdown next to the search box where we can select the context to work in:
When working with multiple package sources, the list of installed packages as well as the search results will show us where a package comes from, by displaying the package source name and a color right next to it. This makes it easy to see whether a package comes from the public NuGet.org or from a private package source.
A log tab was added as well, which will show the logs of NuGet operations performed, like an install, update, delete or package restore. Files and folders have hyperlinks on them, so it’s easy to open them in explorer. It’s also possible to select text in the log and use the context menu to Google or create a gist to share with colleagues.
One of my personal favorites is the addition of the cache tab. Caching downloaded packages and metadata makes sense for a package manager, but NuGet tends to consume liberal amounts of disk space in various cache folders on disk. The cache tab lets us view the disk space consumed in these caches, and allows us to clear them from the UI.
Rider also lets us select caches we want to auto-clear when the solution is closed. For the Temp cache, this is enabled by default. Older NuGet versions extract packages to disk to extract metadata and often are not cleaned up. We’ve seen Temp caches use tens of gigabytes!
We’re not done yet! There are several features and improvements we are working on. Do give the latest Rider EAP build a try! We’d love to hear your feedback!