简体   繁体   中英

Cannot find package from NuGet stream hosted in Artifactory

So we have an Artifactory set up to share different resources for our team and one of them ofcourse being NuGet packages. Now, I am very very new to Artifactory and one of my teammate uploaded a NuGet package on Artifactory and gave the stream address which looks like :

Http:/OurArtifactory/api/nuget/folder

I went ahead and added that URL as a new NuGet source on my visual studio. And Visual studio added that address as a valid source. So far so good. Now, when I go to the browse window of NuGet Package manager in my VS, I was expecting to see that one package which I see hosted in Artifactory. But I do not see any package when I am on that window.

Now, since this is an authenticated server, I realized that I have to set my security credentials here. Which I did using following commands:

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

Also here I tried supplying

  • Regular password, encrypted password and also API KEy in the password field of the command but nothing seems to be working.

Now, even after I set the security credentials, the problem remains. One more thing I realized when I requested verbose logs with creating -verbose flag on is that it is definitely able to find the stream and getting OK back from the stream, its just when it tries to find the package, then it does not find the package inside the stream. My logs looks like below:

install-package ArrayAnalysis.Data -verbose GET https://url/finbyId()' OK https://url/findbyid()' 5ms Install-Package : Unable to find package 'package.name' At line:1 char:16 + install-package <<<< ArrayAnalysis.Data -verbose + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

I am not sure if I am supposed to be doing something that I am missing. Any ideas?

Please make sure that "Include prerelease" option is checked when you want to show a prelease version or you nuget feed only have prerelease packages. 在此处输入图片说明

And if you want to install the prelease version via command in Nuget Package Manager Console, you have to specify the detailed version. For example:

install-package ClassLib -version 1.0.0-rtm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM