-
Notifications
You must be signed in to change notification settings - Fork 269
Description
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