- Dev Blogs
- The NuGet Blog
The NuGet Blog
The latest news, updates, and insights from the NuGet team
Latest posts
Improved search syntax on nuget.org and in NuGet Visual Studio extension
The NuGet team recently deployed a new and very useful search capability on nuget.org, which allows you to narrow your search to a pariticular attribute of a NuGet package. For example, if you want to search for packages which contain 'elmah' within the Id, you type 'id:elmah'. (Note that this will execute a 'contains' search, not an exact match search. Which means it will return elmah, elmah.corelibrary, etc.) Similarly you can use the same syntax to search for other attributes in the package metadata. Here's the complete list of supported attributes: Note that when a search query contains spaces, the galler...
Introducing Package Statistics
We have introduced a new feature on http://nuget.org where you can see download statistics for packages. With this initial drop, we hope to whet your appetite and collect your input on further statistics features; it's a mere fraction of what we can imagine. Statistics Tab At the top of the site, a new 'Statistics' tab is displayed. This tab takes you to http://nuget.org/stats, which shows the two high-level statistics reports we have at the moment. While we expect this page will expand with more reports, the first two we've introduced are "Downloaded Packages (Last 6 Weeks)" and "Downloaded Package Versions...
Workflow Changes for CodePlex Issues
A couple weeks ago, some of you noticed that the core team closed a few issues on http://nuget.codeplex.com that were in the “Soonish” release. The items that were closed were feature suggestions that, while not bad ideas, were things that the core team decided weren’t going to make the cut for the next few releases. The pushback from the community in response was understandable. After all, if NuGet is an OSS project, why would the core team close good ideas simply because we weren’t going to act on them? Firstly, we’ve reopened the items that we had closed and moved them to the “Product Backlog” release (more on...
Managing Package Owners on nuget.org
While each NuGet package's nuspec metadata defines the package's owner(s), the NuGet gallery at nuget.org ignores that piece of nuspec metadata. Instead, ownership of a package is defined by who publishes the package to the gallery. Sometimes this metadata needs to be managed beyond the initial package publishing too, which means the owner metadata needs to be mutable while the package itself is not. Setting a Package's Initial Owner When a brand new package is published to nuget.org, its initial owner is defined by the user that published the package. Specifying Additional Package Owners It's common for...
A quick tutorial on the Update-Package command
Among the supported commands in NuGet's Package Manager Console, Update-Package is arguably the most powerful in terms of its supported parameters and switches. The primary purpose of the command is to update package(s) in your projects to a higher (possibly latest) version. However, the provided parameters allow you to twist this behavior in many different ways. In this post, I'm going to give a quick tutorial on what possible ways you can invoke the command. In total, the Update-Package command offers eight parameters (in addition to the built-in PowerShell parameters): Although the type of the -Version par...
Creating custom package rules for your build
When you build your NuGet packages using nuget.exe, you may have noticed that sometimes you get a warning about the created package. Here's one example: This warning is generated by one of NuGet's package analysis rules. Think of these as the NuGet equivalent of an FxCop rule. When nuget.exe creates a package, it automatically executes the package analysis step which in turn invokes all the registered rules. These rules will, one by one, examine the built package and emit the warnings as you see. You can disable this analysis step by supplying the parameter to the 'pack' command, although we don't recommend i...
Invoking NuGet Services from inside Visual Studio
One of the best kept secrets of the NuGet extension is that besides the UI that everyone has become familiar with, it also exports some useful services, via MEF, which allow other components in VS to interact with NuGet. These include installing packages, uninstalling packages and querying for installed packages. Over the past year, the NuGet team has received many inquiries from various teams inside and outside Microsoft asking us how to perform such tasks from their components. We have solidified the guidance over time and wanted to share it broadly. As of the current version (2.0), NuGet exports six interfac...
Recent Changes to Package Restore Consent
When we released NuGet 2.0, one of the changes included the addition of a privacy-related constraint to the package restore feature. More specifically, NuGet 2.0 required that you provide explicit consent, via either a checkbox in the package manager configuration dialog or an environment variable, before it would successfully download required packages as a part of the package restore workflow. The constraint was added specifically with build scenarios in mind. However, the implementation extended to other scenarios and as a result, added some unhappiness to the overall NuGet experience. Therefore, we’ve revisi...
Feed Performance Update
As you might know, NuGet has been having some performance (and timeout) related issues recently. Earlier this week, we completed a deployment that helped, but it didn't address everything. Many users are still seeing slow responses or even timeouts when trying to use the 'Manage NuGet Packages' dialog in Visual Studio. Ongoing Investigation The deployment earlier this week greatly improved the packages page on the gallery, but it didn't address the Visual Studio dialog performance as much as we had hoped. Since that deployment, we've been focusing on the queries behind the Visual Studio dialog. We have found ...