Skip to content

Make noop restore faster - speed up evaluations by calling MSBuild Static Graph apis #8791

@jeffkl

Description

@jeffkl

Details about Problem

In MSBuild 16.0, a new Static Graph API was added for parsing project trees in a more efficient way. This new API also can express dependencies so that callers can build a graph that represents the tree. NuGet should adopt this new API to replace the way projects are being evaluated via target execution which would reduce command-line restores dramatically.

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): Any

NuGet version (x.x.x.xxx): Any

dotnet.exe --version (if appropriate): Any

VS version (if appropriate): Any

OS version (i.e. win10 v1607 (14393.321)): Any

Worked before? If so, with which NuGet version:

Detailed repro steps so we can see the same problem

  1. From the command-line, restore a large tree of projects.

The restore takes around 30 seconds for 700 projects. With Static Graph and other perf improvements, it takes less than 6 seconds.

Other suggested things

Verbose Logs

Please include verbose logs (NuGet.exe -verbosity detailed | dotnet.exe --verbosity diag | etc...)

Sample Project

Very helpful if you can zip a project and paste into this issue!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions