-
Notifications
You must be signed in to change notification settings - Fork 252
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
[DCR]: Central Package Management - Respect .props file as a way to opt-in to the feature. #11834
Comments
Is this bug outdated? I ask because you're saying that devs that want CentralPackageManagement need to opt-in via MSBuild property, but the URL you quote (https://github.com/NuGet/Home/wiki/Centrally-managing-NuGet-package-versions#opt-in-central-package-version-management ) says that it's enough to have the .props file. |
We have decided to revert this breaking change based on customer feedback. |
Spent a long time fixing this in a solution of 100+ projects, some of which used CPM (opt-in) and some didn't. The D.P.p file existed (for those that opted-in) but then broke everything else. Glad to see this reverted. I'm not a big fan of the 'magic file' mechanism - at least not unless there is a 'soft-on' mechanism. If it was possible to have it use CPM doesn't work very well for multi-targetting when you need different versions based on target framework - so it is not a total panacea and shouldn't be the default. |
NuGet Product(s) Affected
Other/NA
Current Behavior
To opt-in to central package management, one must explicitly enable a MSBuild property today. This brings quite a bit of confusion to users given the original spec mentions that if a file exists, all projects will be opted-in to the feature.
https://github.com/NuGet/Home/wiki/Centrally-managing-NuGet-package-versions#opt-in-central-package-version-management
Desired Behavior
If a .props file exists or is imported appropriately, projects should be automatically opted-in to central package management unless there is an explicit MSBuild property disabling the use of the feature.
Additional Context
This is currently a papercut that brings confusion to everyday users. We have documented this for now, but would like to make this more intuitive in the future.
Breaking Change
This would be considered a breaking change in the scenario where a user has a
Directory.Packages.props
for some reason and is not setting theManagePackageVersionsCentrally
property. CPM would now be on and they would need to setManagePackageVersionsCentrally
tofalse
explicitly if they don't want to use CPM.The text was updated successfully, but these errors were encountered: