Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Installing a package in Visual Studio when using central package management results in an error before projects can be modified #11828

Closed
jeffkl opened this issue May 23, 2022 · 0 comments · Fixed by NuGet/NuGet.Client#4642
Assignees
Labels
Area:RestoreCPM Central package management Priority:1 High priority issues that must be resolved in the current sprint. Type:Bug
Milestone

Comments

@jeffkl
Copy link
Contributor

jeffkl commented May 23, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:RestoreCPM Central package management Priority:1 High priority issues that must be resolved in the current sprint. Type:Bug
Projects
None yet
1 participant