NuGet from within VS fails to update a package if one or more package sources are unavailable #10164
Labels
Functionality:Restore
Functionality:VisualStudioUI
Package Manager UI et al
Resolution:ByDesign
This issue appears to be ByDesign
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): VS UI
NuGet version (x.x.x.xxx): 5.7.0
VS version (if appropriate): VS 2019 Enterprise 16.7.6
OS version (i.e. win10 v1607 (14393.321)): Windows 10 version 2004
Detailed repro steps so we can see the same problem
Have a package from NuGet.org installed in a
PackageReference
-style .NET Core 3.1 project.Have NuGet configured for multiple sources, including NuGet.org.
Have one of those sources that is not NuGet.org be unavailable.
Attempt to update a package.
Expected result
The package is updated.
Actual result
NuGet sits for 30 seconds with all its UI elements disabled like it's actually doing something, then re-enables all its UI elements. But the package in question is not updated. You can repeat this as many times as you want and nothing changes (AKA definition of insanity).
The only clue that NuGet is failing at basic functionality is a line in the Output window for Package Manager:
The local source 'xxxxxxxxx' doesn't exist.
As such I'm guessing it's related to the stupidity that's #7189.Okay, why can't NuGet check and use the sources that are available? And maybe log a warning saying "skipping source 'xxxxxxxxx' because it cannot be contacted"? You know, sane behaviour that most sane people would expect?
Or if such functionality is too advanced for the NuGet team to implement, perhaps show an error dialog with the message instead of just dumping it to a place where few would think to look. After all, if the program fails to do something, a sane human being would logically expect a reason for that failure to be prominently displayed!
But perhaps I should stop expecting sane behaviour from NuGet. After all, this repo is where bug reports about this product go to die. The only reason I'm writing this is to prevent anyone with the same issue from having to file a bug report with the expectation that said issue will actually be fixed.
The text was updated successfully, but these errors were encountered: