NuGet Product Used
Visual Studio Package Management UI
Product Version
Latest
Worked before?
No
Impact
I'm unable to use this version
Repro Steps & Context
When installing a new package in Visual Studio, NuGet attempts to preview the restore by modifying the graph and running the restore without committing it to disk. However, the package dependency that gets added to the graph does not take into account that central package management is in use so the preview restore fails. We need to update this code to modify the restore graph and take CPM into account.
https://github.com/NuGet/NuGet.Client/blob/3e6b1e48ad1d54563e0dd1370eece3d163a5e79f/src/NuGet.Core/NuGet.ProjectModel/PackageSpecOperations.cs#L145-L150
Verbose Logs
No response