New dependency resolver downloads more packages than before #13943
Labels
Area:NewDependencyResolver
Issues related to the new dependency graph resolver
Priority:2
Issues for the current backlog.
Type:DCR
Design Change Request
NuGet Product(s) Affected
NuGet.exe, Visual Studio Package Management UI, MSBuild.exe, dotnet.exe
Current Behavior
As an optimization, the new dependency resolver downloads packages in parallel. However, when processing the direct package references, the dependencies are also downloaded when they weren't before.
For example:
The new resolver queues up a task to download
A 1.0
andB 2.0
. Then it processesA 1.0
and queues up a download ofB 1.0
. Then it processesB 2.0
which ends up being the resolved version. However, sinceB 2.0
was directly referenced, NuGet does not need to technically downloadB 1.0
.Desired Behavior
We should process all of the direct dependencies first and then use background tasks to download children after that, ensuring that extra packages are not downloaded.
Additional Context
Some users are hitting issues since their feeds don't offer up the packages. So even though the resolved graph is identical, they experience restore failures.
Workaround
Users can workaround the issue by setting an MSBuild property in their
Directory.Build.props
or an environment variable:Related Issues
#13930
The text was updated successfully, but these errors were encountered: