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

Central Package Management to replace packages.prop #2730

Closed
clin1234 opened this issue Jul 1, 2022 · 3 comments
Closed

Central Package Management to replace packages.prop #2730

clin1234 opened this issue Jul 1, 2022 · 3 comments
Labels
Build Automation Enhancement Areas for improvement

Comments

@clin1234
Copy link
Contributor

clin1234 commented Jul 1, 2022

Is your feature request related to a problem? Please describe.
The repo's root contains packages.props, which lists versions of dependent NuGet packages used as default versions in all csprojs, unless otherwise specified in the csproj. This resembles Central Package Management, an official feature in .NET: https://devblogs.microsoft.com/nuget/introducing-central-package-management/

Describe the solution you'd like
According to the link, do the following:

  1. Create a Directory.Packages.props file at the root directory, set the MSBuild property ManagePackageVersionsCentrally in the file to true.
  2. Set the PackageVersion in the props file as usual
  3. In each csproj, for each PackageReference containing a Version attribute that does not have a version number, omit the attribute.

In effect, that implies renaming packages.prop to Directory.Packages.props, moving each property that pins a package version to a normal PackageVersion tag, and moving the PackageVersion tags to a separate ItemGroup.

That also implies bumping the minimum build versions:

@clin1234 clin1234 added the Enhancement Areas for improvement label Jul 1, 2022
@christophwille
Copy link
Member

Yes, this was already on our list - but we moved it to the backburner because of the tooling requirements (we usually try to not require the hottest stuff off the presses).

@christophwille
Copy link
Member

As pointed out in the dev meeting notes, this feature will be considered the earliest > 17.4 RTM (our current solution works)

@christophwille
Copy link
Member

Implemented via #3124

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Build Automation Enhancement Areas for improvement
Projects
None yet
Development

No branches or pull requests

2 participants