Package is not found in the following primary source

坚强是说给别人听的谎言 提交于 2020-05-25 03:23:31

问题


I have a build pipeline set up to create Nuget packages and publish them to a feed in artifacts.

I was able to use the feed successfully.

However when I ran the pipeline again, causing the packages to publish again I am not able to update the consuming project successfully.

Even though I can see the correct new version number in the Package Manager (Visual Studio -> Tools-> Nuget Package Manager -> Manage Nuget Packages for solution)

When I click install I get an error

Package '<mypackagename with version number>' is not found in the following primary source

<correct feed nuget/v3/index.json> Please verify all your online package sources are available (OR) package id, version are specified correctly.

回答1:


This is caused by caching. If you don't want to wait like the above answer suggested, just clear Nuget caches by going to Tools -> Options -> Nuget -> General and click on the "Clear All Nuget Cache(s)" button.




回答2:


I waited another 5 minutes and the problem went away. Maybe the version shows before the publishing is complete.




回答3:


You have to check your package source I think the default is

Microsoft Visual Studio Offline Packages 

So, you can change that to "All".



来源:https://stackoverflow.com/questions/54738695/package-is-not-found-in-the-following-primary-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!