-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package update not found when updating via Visual Studio Solution #1827
Comments
@deadlydog thanks for the feedback. We will try to get a repro and get it fixed. Are you seeing this for any particular package or packages that where just freshly pushed to nuget.org? What feed are you using? Can you share a fiddler trace when this issue happens again? |
Now that you mention it, I have typically seen it when trying to download my own packages that were pushed very recently to nuget.org. If I encounter the issue again I'll try and provide a fiddler trace. |
This makes "some" sense, what you see is probably an incorrect propagation of pushed packages showing up in the search results but not yet available to download (this could happen if one server updated faster than another, and you hop between them). This is something we are working on improving. Still just to verify it a fiddler trace will be of great help. |
Hi guys, so I was seeing this problem again and brought up fiddler. The new update that I just published showed up right away, but when trying to update I got the error. After bringing up Fiddler and hitting the Update button again, VS was not making a connection attempt at all to NuGet; it would just report the error. I flipped my package source to my work's internal repo and saw it make connections to it to do a search for updates, but when I flipped it back to nuget.org, again no connections. So even though I was getting the "loading" bar, it seems it was just searching it's local cache for updates, and not trying to go out to nuget.org. So I closed VS and reopened it, and this time everything worked. I'm guessing that closing VS invalidates VS's local cache so that it actually attempts to go to nuget.org to get the package. I hope that helps. It seems pretty easy to reproduce if you guys want to give it a shot. Just upload a new package version to nuget.org and try and update to it within a few minutes of the upload (I had VS open while uploading the new version). |
Um, not sure how I unassigned @feiling from this ticket when I added my comment, but I'm not able to reassign him... |
No problems, @feiling left so it is just a github quirk. We now understand this issue, and it makes total sense, caching is expected. We should move this issue out as a lower priority item and deal with busting caches in this case. |
I think the problem is, that the nuget client caches http request for a package for 30 minutes: We have the same problem with internal nuget packages for continuous integration builds. It would be great to disable this cache. |
@hakito this is not the case in 3.3, this is new code. And we have a way to deal with it by resetting the cache on install. We are running out of time for 3.4, I'm moving to 3.5 for John to look at |
oops didn't mean to open it right away.... |
Yep, same issue for me on vs 2017 15.8.4, @zorgoz 's solution fixed it for me. |
Yes, this issue still exists. @zorgoz solution fixed the issue in my case. |
Same issue on VS 2017 15.9.2, specifically when pulling from packages published to our Azure Devops Nuget server. @zorgoz 's solution worked. |
Expanding on the workaround provided by @bvirkler here's more detail:
|
Reopening to run with an investigation |
Same problem here, Clearing All Nuget Caches solved the issue. |
Same issue with VS2017 15.9.8. Nuget package published to Azure Devops. |
Same issue with VS2017 15.9.10. Nuget package published to Azure Artifacts - credential cache must be getting corrupted during the upgrade. VS installer should probably just do this action for you. 😉 I didn't have any other issues reading packages from the v3 feeds outside VS IDE. Manually Resetting Nuget Cache in VS IDE after Updating |
I have the error also, but use another workaround: After using alohaninja's solution: I can now use the "Install" button again. |
Apparantly this is still an issue for VSTS nuget feed in Visual Studio 2019. I was just having the same issue with an internal package that I had updated. the fix suggested by @bvirkler in regard to clearing the nuget cache worked for me |
Still an issue in VS Pro 2019 v4.8.03761 |
Noticed this today |
Sorry to hear that this continues to be an issue for folks. We tried this on 16.6 Preview 1 and weren't able to reproduce the problem. These are the steps that we followed:
Did we miss something? If someone could help confirm that this issue continues to be present in 16.6 Preview 1 or later, that'd be great! Thanks! |
More broadly, any package that is recently published to a nuget feed will not be updated until some time after. So if you publish a nuget package to Azure DevOps, then try to update the package in another solution, Visual Studio will not see the new package. |
@bgiromini the scenario you described sounds like a duplicate of #3116. If this whole issue is about the same scenario, packages not downloadable for about 30 minutes after publishing to a feed, then one of the two issues can be closed as a duplicate. |
I've seen this less often recently. It's is most likely related to newly published packages - but clearing the Nuget package cache is always the instant fix for me. |
This problem occurs occasionally when trying to update nuget packages from the NuGet package manager within Visual Studio 2015, but only occurs when updating packages at the solution level; that is, right click on the solution (not the project), and choose "Manager NuGet Packages for Solution...". It will find an update for a nuget package just fine and list the latest version, but after you select the projects to update and click the Install button, the installation fails with a message similar to the following in the Output window.
Trying to do the install repeatedly just results in it failing with the same error.
Sometimes closing VS 2015 and reopening it will fix the problem and the install will succeed, but not all of the time. I have found that the most reliable work around is to right-click the project and choose "Manager NuGet Packages..." and do the update from that window, for each project that needs the update. For some reason updating the nuget package at the project level does not have the same problem; it only occurs at the solution level.
I didn't think to try doing the update from the NuGet Package Manager PowerShell Console, so I'll give that a try as well next time it happens and update this ticket with the results.
I first ran into this problem months ago when I updated to VS 2015 and NuGet Package Manager 3, but now after installing VS 2015 Update 1 and NuGet Package Manager 3.3.0.167 the problem persists. As I mentioned above, the problem does not happen every time; it seems to be sporadic.
The text was updated successfully, but these errors were encountered: