[Bug]: Installing a package in Visual Studio when using central package management results in an error before projects can be modified #11828
Labels
Area:RestoreCPM
Central package management
Priority:1
High priority issues that must be resolved in the current sprint.
Type:Bug
Milestone
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
The text was updated successfully, but these errors were encountered: