-
Notifications
You must be signed in to change notification settings - Fork 256
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
NuGet restore failed if one source is down even all packages are in cache #6145
Comments
Historical issues with sources: #4949 |
If all packages are in the global packages folder and there are zero misses, and zero floating versions then NuGet will not attempt to go online. We should have nuget.exe tests that verify there are zero network calls. If NuGet does need to resolve a package then it will check the sources, and in that case is needs to contact all sources to get a coherent result. So I'm unsure that this is a real issue unless this refers only to the http cache. |
Steps
Try also using -Force or removing the obj folders to ensure it still does not go online. |
We could improve this overall by ignoring source failures until we are sure the package doesn't exist. |
@emgarten, we should do the same for floating versions. May be issue warnings in this case? |
I'm not sure that it is safe to ignore failed sources when floating, but it could work as a warning with the option to make it an error. |
Yep. In addition, we could put the ignore failing sources under an option. Like we do for NuGet command line. |
I just checked it If all packages are in the global packages folder and there are zero misses, and zero floating versions then NuGet doesn't tries to go to online. It works fine. About ignoring failed sources, then we already have a separate workitem for that - #5643 |
the scenario is:
one enabled source is down and all package which need to be restored are in cache.
NuGet restore still fail due to one source is down.
The text was updated successfully, but these errors were encountered: