"No packages found" when having Azure Artifact as package source

2.4k Views Asked by At

Due to the usage of Babel, that require us to host ourself the package manager on a private repository, we are using Azure Devop as a source of our packages.

But now when we look for any package that is not yet somewhere in the solution, we end up with a "No packages found":

Here we were looking for "roslynator" enter image description here

If I do this same request in a brand new project. No issues at all, I find the packages.

but we have nuget.org correctly specified in the upstream sources: enter image description here

And the whole team is listed as contributor. I cannot find any error anywhere when we are fetching the packages. I tried to execute the command Install-package Roslynator. The commands succeed, and then I'm able to see the package in the GUI of visual studio(and in the web console of visual studio).

Seems to be an issue on Visual studio level, but I cannot understand what is causing it?

2

There are 2 best solutions below

6
On

According to the steps in the Consume NuGet packages in Visual Studio document: If you're using upstream sources, any packages from upstream sources that haven't been saved to your feed yet (by using them at least once) won't appear in the Package Manager search result. To install those packages:

  1. Copy the Install-Package command from the public registry (NuGet.org).
  2. Select Tools then NuGet Package Manager to open the NuGet package manager.
  3. Paste the command into the Package Manager Console and select run.

So this is the expected behavior and your steps are correct.

Update:

If you want to find all packages in nuget.org, you need to choose nuget.org as source and search packages instead of using your Azure DevOps sources: enter image description here

According to this document:The nuget.org upstream source allows you to merge the contents of nuget.org into your feed such that the NuGet client can install packages from both locations without making multiple search queries. Enabling upstream sources also automatically enables saving of packages you use from the upstream source.

0
On

If you dislike this behavior (and who wouldn't) you can up-vote this Visual Studio Developer Community issue: Allow search upstream sources on Azure Artifacts

And I can confirm as of 12/28/2022 this is still an issue. :-(