NuGet is a successful system. That means that there are a lot of people creating packages for the Nuget consumer. Unfortunately this also means that it can be hard to find packages in the vast NuGet gallery. This tutorial looks the search filters available on the NuGet gallery and in the NuGet Console. Use the filters to drill down into the catalog and find the package you want.
- View Offline
- [Voiceover] NuGet is a successful system. That means that there are a lot of people creating packages for the NuGet consumer. Here on the NuGet website, you can click on the packages tab and see that there are over 52,000 packages. There are dozens of categories of tools. You're sure to find some that will enhance your project. I like to scan the site occasionally and look for new packages. And I find it helpful to search by tag, rather then scrolling through the list. Here's what I mean. Look at this package here, Bootstrap CSS. On the bottom of the entry are a number of hyperlinks, css, js, less, mobile-first, and more.
These are hyperlinks that let me drill down or filter the list to just this tag. I'll click on css and the NuGet site shows me that there are 319 packages marked with this tag. If you'll look at the top of the page, you'll see that it says Tags "css". Now you can use either the singular or the plural version of this. That works the same. This also means that you don't have to look through the site and find a hyperlink. If you know the tag name that you're looking for, just come up here and type in the new value.
Like that. Now it will look for all of the packages marked with the tag angular. There's 166 of those packages. Next, I'll click on this AngularJS hyperlink. And we'll look at the details section on the right side of the page. You can search by owner, author, tag, and version. This will look for all of the packages tagged with the current version of 1.6.1.
Looks like I found a match for a few of these. You can also see who owns the package. It's possible to have multiple owners. For instance, if I look at EntityFramework. You'll see that it is owned by Microsoft and aspnet and EntityFramework. Here's another scenario, one of your colleagues or friends has written a package and you don't remember the name of the tool. You can go to the website and look for author. This returns all of the packages that were authored by someone named Michael.
Of course, you can combine the search terms too. I'm looking for css version 1.2. The detailed search tool helps you drill down into the database. I like it. But, there is one limitation you should know about. It doesn't have any way to order the results. For example, organizing the packages by time stamp or package name. If you prefer using the Visual Studio tools, you'll be pleased to know that the search terms work there too. Copy this. Switch over to Visual Studio. I've opened a project. Then I'll go to the tools menu and choose NuGet Package Manager, Manage NuGet Packages for Solution.
Click on the browse section and then in the search box, just use the same terms I showed you over on the webpage. Version 1.2.0 and tagged with the css tag. Now that you know a bit more about the search tools, have a go at finding some new and interesting packages.
- What is a package manager?
- Installing NuGet in Visual Studio
- Installing and managing packages
- Updating packages
- Working with PowerShell and NuGet
- Finding packages with NuGet Gallery and ASP.NET MVC
- Using Package Restore
- Using the Chocolatey machine packet manager
- Using Boxstarter for creating installation packages
- Using OneGet/PackageManagement
- Creating, publishing, and installing a custom NuGet package