Skip to content
Maarten Balliauw
← back
ASP.NET 2 min read

SymbolSource support for NuGet Package Source Discovery

edit this page

A couple of weeks, I told you about NuGet Package Source Discovery. In short, it allows you to add some meta information to your website and use your website as a discovery document for NuGet feeds. And thanks to a contribution to the spec by Marcin from SymbolSource.org, Package Source Discovery (PSD) now supports configuring Visual Studio for consuming symbols as well. Nifty!

An example

Let’s go with an example. If we discover packages from my blog, some feeds will be added to NuGet in Visual Studio.

plaintext

Install-Package DiscoverPackageSources
Discover-PackageSources -Url ""

Because my blog links to my feeds on MyGet, I can provide my MyGet credentials with it:

plaintext

Install-Package DiscoverPackageSources
Discover-PackageSources -Url "" -Username maarten -Password s3cr3t

Note I’ve stripped out some of the secrets in the examples but I’m sure you get the idea.

What’s interesting is that because I provided credentials, MyGet also returned the SymbolSource URL for my feeds and it registered them automatically in Visual Studio.

Now that’s what I call being lazy in a professional manner!

On a side note… NuGet Feed Discovery

While not completely related to SymbolSource support, it’s worth mentioning that Package Source Discovery also got support for that other NuGet discovery protocol by the guys at Inedo, NuGet Feed Discovery (NFD). NFD differs from PSD in that both specs have a different intent.

  • NFD is a convention-based API endpoint for listing feeds on a server
  • PSD is a means of discovering feeds from any URL given

The fun thing is: if you add an NFD url to your web site’s metadata, it will also be added into Visual Studio by using NuGet Package Source Discovery. For reference, here’s an example where I add my local NuGet feeds to my blog for discovery:

plaintext

<link rel="nuget"
      type="application/atom+xml"
      title="Local feeds"
      href="http://localhost:8888/nugetext/discover-feeds" />

Enjoy!

Maarten Balliauw

Writing about .NET, web, performance and security, since 2006.

Related posts

★ Prefer this blog on Google