2
votes

I am trying to use an Artifactory repository as a nuget package source in Visual Studio 2017, and my nuget package does not show up in the Nuget Package Manager. The manager says "No packages found" (or only shows existing installed packages). In PackageManager Settings / Package Sources, I set up a package source with a url like the one below

http://server_name/artifactory/api/nuget/repository_name

In Manage Packages for Solution, I only selected this one source and clicked "Include prerelease", but no sign of my package in the package manager. I can successfully upload and download nuget packages to/from the repository using jfrog.exe without a problem. If I enter my repository url in a web browser, it shows the repository service as an xml page.

Any idea what could be preventing the available nuget packages from being shown in the package manager?

3
What do you see in the Artifactory logs? (request.log and artifactory.log) - Ariel
I may be running into the same issue. I continue to get No packages found. I think it may have to do with authentication. According to this comment, the apiKey is not used when reading the feed. However, I added username and cleartext password, but it still isnot working for me. I am able to push just fine (using dotnet nuget push)... - Lucas

3 Answers

2
votes

Any idea what could be preventing the available nuget packages from being shown in the package manager?

Artifactory repository is an authenticated server, you should set your security credentials by using following commands before use it in the package manager:

nuget setapikey [apikey] -source [feedUrl]
nuget sources add|update -Name [name] -source [feedUrl] -User [username] -pass [password]

Make sure you can use nuget.exe to push the nuget package to the server successfully.

Here is a video about how to set up Artifactory as a NuGet repository, you can refer it for some more details.

1
votes

I found that what finally fixed the problem for me was to login as admin, select my repository under local repositories, and check the Force Authentication checkbox. That makes Nuget pop up a username/password dialog, and after I fill it in, I can see my nugget package and install it ok.