在下面的主源中找不到包

我建立了一个构建管道来创建 Nuget 包,并将它们发布到工件中的提要中。

我成功地使用了信号源。

但是,当我再次运行管道,导致包再次发布时,我无法成功地更新消费项目。

尽管我可以在包管理器中看到正确的新版本号(Visual Studio-> Tools-> Nuget Package Manager-> Manage Nuget Packages for Solution)

当我点击安装时,我得到一个错误

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.
22061 次浏览

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

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.

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

Microsoft Visual Studio Offline Packages

So, you can change that to "All".

package source

In my case there was a private network folderbased nuget repository listed in my sources. And at the moment it was not available. I unchecked it in "Tools->Options->NuGet Package Manager->Package Sources" and the whole thing started to work

In my case I did not include the url from nuget.org in the Package Source. Therefore add the url from nuget.org in "Tools-> Options-> NuGet Package Manager-> Package Sources" and the whole thing started to work. for more details can visit this blog

After 4 hours struggle I found solution here https://www.grapecity.com/componentone/docs/uwp/online-getting-started/config-nugetpackage.html

Tools > Options > NuGet Package Manager > Package Sources. > Click add button and add following one by one...

nuget.org https://www.nuget.org/api/v2/

GrapeCity http://nuget.grapecity.com/nuget reference Image

Restarting Visual Studio 2019 Community fixed the issue for me.