Skip to content

Centralize shared Build/Src package versions#822

Open
johnml1135 wants to merge 2 commits intomainfrom
version_props_refine
Open

Centralize shared Build/Src package versions#822
johnml1135 wants to merge 2 commits intomainfrom
version_props_refine

Conversation

@johnml1135
Copy link
Copy Markdown
Contributor

@johnml1135 johnml1135 commented Apr 8, 2026

Summary

  • Convert Build/Src/Directory.Packages.props from a CPM opt-out into a CPM overlay that imports the repo root Directory.Packages.props.
  • Keep only the Build/Src-specific version deltas in that overlay for packages that intentionally differ from application code.
  • Remove inline package versions from Build/Src/FwBuildTasks/FwBuildTasks.csproj so shared packages resolve from one central declaration.
  • Explicitly keep Build/Src/NativeBuild/NativeBuild.csproj out of CPM because it is a traditional MSBuild project that still relies on explicit and property-driven package versions.

Why this is needed:

  • FwBuildTasks was carrying explicit versions for packages that are also centrally pinned at the repo root.
  • Dependabot bumped System.Resources.Extensions and System.Reflection.Metadata in FwBuildTasks.csproj without bringing the matching root pins along, which left duplicate shared-version declarations out of sync.
  • Bootstrapping FwBuildTasks early does not require a separate source of truth for shared package versions; it only needs a reliable restore/build path.
  • This keeps the intentional Build/Src-only differences while restoring a single declaration point for shared package versions.

CI-ready checklist

  • Commit messages follow .github/commit-guidelines.md (subject ≤ 72 chars, no trailing punctuation; if body present, blank line then ≤ 80-char lines).
  • No whitespace warnings locally:
    git fetch origin
    git log --check --pretty=format:"---% h% s" origin/<base>..
    git diff --check --cached
  • Builds/tests pass locally (or I've run the CI-style build via Bash script or MSBuild).
  • For any Src/** folders touched, corresponding AGENTS.md files are updated or explicitly confirmed still accurate.

Notes for reviewers (optional)

  • Targeted validation completed:
    • msbuild "Build\Src\FwBuildTasks\FwBuildTasks.csproj" /restore /t:Build /p:Configuration=Debug /p:Platform=x64 /p:FwBuildTasksOutputPath="BuildTools\FwBuildTasks\Debug\" /p:SkipFwBuildTasksAssemblyCheck=true /p:SkipFwBuildTasksUsingTask=true /p:SkipGenerateFwTargets=true /p:SkipSetupTargets=true
    • msbuild "Build\Src\NativeBuild\NativeBuild.csproj" /t:Restore /p:Configuration=Debug /p:Platform=x64 /p:SkipSetupTargets=true /p:SkipFwBuildTasksAssemblyCheck=true
  • I did not run a full repo build or the full local CI checklist for this narrow build-infrastructure change.

This change is Reviewable

Copilot AI review requested due to automatic review settings April 8, 2026 16:16
Copy link
Copy Markdown
Contributor

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

Note

Copilot was unable to run its full agentic suite in this review.

Centralizes NuGet package version management for Build/Src by converting its Directory.Packages.props into a CPM “overlay” that imports the repo root pins, while keeping deliberate build-tool-specific version deltas and ensuring legacy projects can remain opt-out.

Changes:

  • Converted Build/Src/Directory.Packages.props to import the repo-root Directory.Packages.props and define only Build/Src-specific version overrides.
  • Removed inline Version= attributes from Build/Src/FwBuildTasks/FwBuildTasks.csproj to rely on central package management.
  • Explicitly opted Build/Src/NativeBuild/NativeBuild.csproj out of CPM.

Reviewed changes

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

File Description
Build/Src/NativeBuild/NativeBuild.csproj Opts NativeBuild out of CPM explicitly.
Build/Src/FwBuildTasks/FwBuildTasks.csproj Removes inline package versions to use central pins.
Build/Src/Directory.Packages.props Imports root CPM props and defines Build/Src-specific package version deltas.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

NUnit Tests

    1 files  ±0      1 suites  ±0   6m 53s ⏱️ +38s
4 103 tests ±0  4 032 ✅ ±0  71 💤 ±0  0 ❌ ±0 
4 112 runs  ±0  4 041 ✅ ±0  71 💤 ±0  0 ❌ ±0 

Results for commit 5fd5b72. ± Comparison against base commit ce304d7.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor Author

@johnml1135 johnml1135 left a comment

Choose a reason for hiding this comment

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

Followed up on the two Copilot review points.

  • The guarded root CPM import and explicit error path have been implemented locally in Build/Src/Directory.Packages.props.
  • The remaining Include versus Update mix is intentional: only the package IDs already defined in the repo-root Directory.Packages.props should use Update in this overlay; Microsoft.Build.Utilities.Core and SIL.BuildTasks are not root-pinned there and must remain Include.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants