Package Management adds nuget.org upstream source

Until now, we’ve focused on making Package Management in Visual Studio Team Services and Team Foundation Server the best place to store your private NuGet and npm packages, but we haven’t focused as much on the packages you use from public sources like NuGet.org. We’ve had basic support for npmjs.com as an “upstream source”, but that’s about it.

As of Connect(); 2017, I’m happy to announce that we’re expanding the upstream sources feature to include guaranteed saving of the packages you use and more sources, starting with the public preview of the NuGet.org upstream source that’s available now.

Upstream sources consolidate your dependencies

Upstream sources enable you to use your VSTS feed as a single “product feed” that contains all of the packages you produce and all the packages you consume. Once you’ve connected a package client (like nuget.exe or npm), you can either publish packages or install any package from an upstream source, without needing to change sources or configure multiple sources on the client.

Upstreams provide a few key benefits:

  • For sources with guaranteed saving (see note), any package you’ve used from an upstream source is guaranteed to exist in your feed as a saved copy. This copy is always available to you, even if the original source is down or (for TFS users) your internet connection isn’t available.
  • On TFS, upstreams can provide faster access to packages because you only need to retrieve a package from the upstream source once; subsequent requests for the package will be served from your TFS server.

(note: currently, the nuget.org upstream supports guaranteed saving; the npmjs.com upstream will be enabled for guaranteed saving early in 2018)

Try the nuget.org upstream source

To try out the public preview of the nuget.org upstream source, you’ll need to create a new feed. Make sure to leave the “Use packages from public sources through this feed” radio button selected.

The new create feed dialog automatically enables upstream sources by default.

Then, click “Connect to feed” and add this feed to the Visual Studio NuGet Package Manager.

In public preview, you won’t be able to search packages that haven’t been saved from the upstream source. So, to save packages from nuget.org, grab a Package Manager command from the nuget.org package page, and run it in the Visual Studio Package Manager Console (which you can open in Tools > NuGet Package Manager menu).

What’s next for upstream sources

There’s even more value coming to upstream sources in the coming months. Next, we’ll be updating the npmjs.com upstream source to provide guaranteed saving. After that, we’ll enable you to use any VSTS feed in your account as an upstream source for any other feed.

We’re excited for you to try out the nuget.org upstream source, and we look forward to your feedback. To see the feature in action, you can also check out the Connect(); on-demand video.

3