Open dusk0r opened 6 years ago
Thanks for the issue. It's already supported for dotnet.exe restore
via --ignore-failed-sources
so you can unblock yourself by switching to dotnet.exe.
@jainaashish - is there an option in the PM UI for this? Switching to .net core is not an economically viable option.
@StingyJack there is no option in PM UI for this. And it may look like a simple thing to do but there are lot of implications because it will start effecting your restore graph randomly. For example, availability or unavailability of a specific source can easily change the restore dependency resolution which will create more trouble then solving some specific asks. So for time being, I'll recommend disabling a specific source or select a specific source to do install/ update/ or restore.
Once we've repeatable build using lock file then we can look into enabling this feature as well because then consumers will have an explicit option to fail or succeed restore when dependency graph changed based on NuGet feeds.
"Repeatable build" and "lock file" seem like unrelated concepts. And I'm not sure I understand why its currently not repeatable. I'll poke around here and see if there is any issue or docs that explains why the dependency resolution would not be repeatable, or would require locking the filesystem in any way.
I'll give a very simple repro..
Like-wise there are other scenarios where unavailable feeds can simply change the restore behavior. Also, NuGet itself cant figure out if a specific source can be ignored during a operation for the same fact that different resolution can come from different sources.
Why would it pick 4.0.0 when I specified 3.0.0? Nuget should not be automatically taking package versions I didnt specify. Thats way worse than VS "helping" me by finding a reference instead of erroring out.
Also, if you follow SemVer (I cant) that's a breaking change version update too.
I can take this up on a new issue if @dusk0r prefers, I don't mean to be a thread pirate.
We use a local NuGet source in addition to nuget.org. During an internet outage NuGet restore tried to use nuget.org and failed with return code 1. The package was available on the local source.
Can we add a way to first try all sources (event if they fail) to restore a package and only fail if we can't find a source?
NuGet.exe 4.6.2