Skip to content

Adopt central package management #11192

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

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
Open

Adopt central package management #11192

wants to merge 15 commits into from

Conversation

jviau
Copy link
Contributor

@jviau jviau commented Jul 17, 2025

Issue describing the changes in this PR

resolves #10619

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • Backporting to the in-proc branch is not required
    • Otherwise: Link to backporting PR -- TODO
  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Migrates to central package management. Additional changes:

  • Reduces explicit package references, instead relying on CentralPackageTransitivePinningEnabled=true
  • Fixes ordering of some nuget audit props
  • Standardizes StyleCop package throughout the repository.
    • Had to address many warnings in Benchmarks and Intergration.Tests projects

@jviau jviau requested review from vrdmr, gavin-aguiar, hallvictoria and a team as code owners July 17, 2025 15:47
@jviau jviau changed the title Jviau/eng/packages props Adopt central package management Jul 17, 2025
@jviau jviau added the area: engineering Engineering improvements label Jul 17, 2025
@jviau jviau force-pushed the jviau/eng/packages-props branch from 79c84f1 to 296ec1f Compare July 17, 2025 22:44
@jviau jviau force-pushed the jviau/eng/packages-props branch from 296ec1f to 294eecd Compare July 18, 2025 17:01
@jviau jviau force-pushed the jviau/eng/packages-props branch from 64d516f to c2656ae Compare July 18, 2025 18:40
@jviau jviau requested a review from liliankasem July 18, 2025 20:29
@fabiocav fabiocav requested a review from Copilot July 18, 2025 21:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the Azure Functions Host repository to use central package management via Directory.Packages.props files. The migration simplifies package version management by centralizing version definitions and leveraging MSBuild's central package management features.

Key Changes:

  • Introduces central package management with Directory.Packages.props files at repository and project levels
  • Removes explicit version numbers from individual project files, relying on centralized version definitions
  • Standardizes StyleCop package usage across the solution while temporarily removing it from projects with warnings
  • Updates MSBuild imports to use GetPathOfFileAbove for improved path resolution

Reviewed Changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.

Show a summary per file

:

File Description
Directory.Packages.props New root-level package version definitions with global StyleCop reference
test/Directory.Packages.props Test-specific package versions for testing frameworks and supporting libraries
tools/ExtensionsMetadataGenerator/Directory.Packages.props Tool-specific package versions with transitive pinning disabled
Multiple .csproj files Removed explicit Version attributes from PackageReference elements
Multiple Directory.Build.* files Updated MSBuild import paths using GetPathOfFileAbove
Worker .props files Changed Version to VersionOverride for worker package references

Comment on lines 15 to 17
<PackageReference Include="Microsoft.NET.Test.Sdk" PrivateAssets="all" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="all" />
Copy link
Preview

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space between attribute name and value. Should be <PackageReference Include="xunit.runner.visualstudio" PrivateAssets="all" />

Suggested change
<PackageReference Include="Microsoft.NET.Test.Sdk" PrivateAssets="all" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" PrivateAssets="all" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="all" />

Copilot uses AI. Check for mistakes.

<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>
<!--
<ItemGroup>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put these here as I am considering pinning these, but will evaluate after

@jviau jviau requested a review from fabiocav July 23, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: engineering Engineering improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explore Central Package Management
3 participants