[DCR]: When installing a package in VS with central package management, update all projects in the solution #11912
Labels
Area:RestoreCPM
Central package management
Functionality:Restore
Priority:2
Issues for the current backlog.
Type:DCR
Design Change Request
NuGet Product(s) Affected
Visual Studio Package Management UI, Visual Studio Package Manager Console
Current Behavior
Currently when install a package to a project in Visual Studio, NuGet updates the in-memory representation of the project spec and executes a preview restore to ensure the package is compatible with the project. If this succeeds, the project changes are committed and Visual Studio/Project System will nominate the project for restore but nothing happens since the preview restore already ran. However, when using central package management (CPM), an item is updated in
Directory.Packages.props
which could cause multiple projects to need to be restored across the solution after installing a package.Desired Behavior
NuGet should look into whether or not its feasible to execute this preview restore on all projects affected by the package installation. Right now we only restore a single project but NuGet could detect that multiple projects are affected and include them. That way when changes are committed and Project System nominates them, everything would no-op.
Additional Context
Related to NuGet/NuGet.Client#4642
The text was updated successfully, but these errors were encountered: