0

Reducing the availability risk of upstream sources is a compelling reason enough to use Artifacts, even if you don't have a need for private packages. However, once you have projects pointing to the Artifacts feed, the Visual Studio Package Management UI does not show the packages in the upstream feed e.g. nuget.org. Are devs expected to search using the web and use nuget install cli now? Is there a way to use the Package Management UI in Visual Studio instead?

Dan
  • 1,155
  • 11
  • 15

2 Answers2

1

How do you add packages from upstream sources in an Artifacts feed in Visual Studio?

As we know, when we download any packages from the Upstream sources, it will been cached in the Artifacts, so that we could see and use it next time.

So, if we want to use the packages from upstream feed e.g. nuget.org, we must cache the package to the Artifacts feed from upstream feed, then we could see it in the Visual Studio Package Management UI:

enter image description here

enter image description here

Update:

How are developers expected to add (or cache) an upstream source to the Artifacts feed?

Do you want to add (or cache) an upstream source to the Artifacts feed, so that your developers be able to browse the packages from upstream source directly in the Package Management UI?

I am afraid there is no out of box way to do this. Because we could not or not recommend to add (or cache) an upstream source to the Artifacts feed. You can check the reason from my other post:

Is there a way for new or updated packages in the upstream view to automatically be pushed to my feed?

As workaround, we could add those upstream sources as Package resource, then we select the All option in the UI:

enter image description here

hope this helps.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • I apologize my question wasn't clear. I can see this working today. However, our developers are accustomed to being able to browse the entire NuGet feed in this UI and add packages from the NuGet feed. With the project feeds set to a custom Artifacts feed, developers can not longer do this (even with nuget as an upstream source). How are developers expected to add (or cache) an upstream source to the Artifacts feed? – Dan May 19 '19 at 18:28
  • @Dan, Thanks your reply. Check my updated answer for the details. – Leo Liu May 20 '19 at 02:29
  • Thanks for the extra details. _Do you want to add (or cache) an upstream source to the Artifacts feed, so that your developers be able to browse the packages from upstream source directly in the Package Management UI?_ – Dan May 22 '19 at 19:20
  • 1
    _Do you want to add (or cache) an upstream source to the Artifacts feed, so that your developers be able to browse the packages from upstream source directly in the Package Management UI?_ Not exactly. We'd like developers to have the ability to search NuGet and chose to add it to our Artifacts feed from the PM UI, rather than having to open a browser and navigate to nuget.org to find the package, and open the PM console and issuing an Install-package command. This would be a new workflow for devs, and introduces more steps. We aren't asking for automatic updates, just an efficient way to add. – Dan May 22 '19 at 19:30
1

Today, you'll need to use the NuGet Package Manager Console and an Install-Package command copied from NuGet.org.

Alex Mullans
  • 1,699
  • 2
  • 17
  • 34