Visual Studio ignoring CPM opt-out when ManagePackageVersionsCentrally is false but Directory.Packages.props exists #12359
Labels
Area:RestoreCPM
Central package management
Functionality:VisualStudioUI
Priority:2
Issues for the current backlog.
Resolution:External
This issue appears to be External to nuget
Triage:Investigate
Type:Bug
Milestone
NuGet Product Used
Visual Studio Package Management UI
Product Version
VS 2022 Enterprise 17.4.3
Worked before?
No response
Impact
It's more difficult to complete my work
Repro Steps & Context
Consider a repository with the following structure:
Directory.Packages.props
opts into central package management (<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
).Directory.Packages.props
file in thesrc
folder opts out of central package management (<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
).solution.sln
is opened in Visual Studio and you add a package reference to the project via the VS Package Manager UI, the project reference in the project file is added without a version and a package version is added to the nestedDirectory.Packages.props
instead, even though the closestDirectory.Packages.props
file to the solution has opted out of central package management.Steps to reproduce:
Workaround is to manually enter or update package references in the project file instead of using the UI.
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: