Open rohit21agrawal opened 7 years ago
Just hit this and was unsure why Restore was doing nothing.
There is an error message but it's only visible if "Build + IntelliSense" is enabled in the Error List.
If the setting to allow NuGet to restore is disabled:
Then we should also disable the Restore command in the Solution context menu and provide a tooltip explaining why:
And finally, the error should be more prominent. Several suggestions in the original issue above.
Related: changes to the error message in https://github.com/NuGet/Home/issues/5624
Filed from FEEDBACKTICKET 506597
(Admittedly, I was a actually a little unsure about what exactly this option did or when one might want to disable it. Better doc might help there, but that's a separate issue. Anyway, I needed to uncheck it because autorestore breaks another solution I sometimes work on.)
Result: It seems like nothing happens rather than seeing an obvious message explaining why nothing is happening.
Expected: Should show a user visible message here that explains what's going on.
It turns out that that the error window actually does include this message "NuGet restore is currently disabled. To enable it, open the Visual Studio Options dialog, click on the Package Manager node and check 'Allow NuGet to download missing packages during build.' You can also enable it by setting the environment variable 'EnableNuGetPackageRestore' to 'true'."
That's a good message, and the error window is shown, but the problem is that I had a couple hundred other messages there (mostly errors caused by the packages not being restored yet). That noise drowns out this message and there's nothing to actually draw the user's attention to that particular message. It's not scrolled to, selected, or anything.
Instead should probably do one of these options (pick your favorite):