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.
Package sources To add a source, select +, edit the name, enter the URL or path in the Source control, and select Update. The source now appears in the selector drop-down. To change a package source, select it, make edits in the Name and Source boxes, and select Update.
Set up Visual StudioIn Visual Studio, select Tools, and then select Options. Select NuGet Package Manager, and then select Package Sources. Enter the feed's Name and Source URL, and then select the green (+) sign to add a new package source.
Restore packages manually using Visual StudioEnable package restore by choosing Tools > Options > NuGet Package Manager. Under Package Restore options, select Allow NuGet to download missing packages. In Solution Explorer, right click the solution and select Restore NuGet Packages.
From the Tools menu, select NuGet Package Manager | Package Manager Settings. The Options dialog box appears. In the left pane, select Package Sources.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With