Skip to content

[ci] Fix internal pipeline OfficialBuildId format#34409

Merged
rmarinho merged 1 commit intomainfrom
fix/internal-build-officialid
Mar 11, 2026
Merged

[ci] Fix internal pipeline OfficialBuildId format#34409
rmarinho merged 1 commit intomainfrom
fix/internal-build-officialid

Conversation

@PureWeen
Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description

The dotnet-maui-build internal pipeline (definition 1536) has been failing on every single build since ~Jan 27 (~5+ weeks) because BUILD.BUILDNUMBER changed format to 10.0.50+azdo.XXXXX.

Arcade's Version.BeforeCommonTargets.targets tries to do arithmetic on OfficialBuildId using [MSBuild]::Add/Multiply/Subtract, but the + character in the new format causes MSB4186: Invalid static method invocation syntax.

Fix

Change the internal pipeline's _OfficialBuildIdArgs from $(BUILD.BUILDNUMBER) to $(_BuildOfficialId) (the yyyyMMdd.counter format already used by all other pipeline configurations).

Impact

  • Internal (dotnet-maui-build): Fixed — uses _BuildOfficialId (yyyyMMdd.counter)
  • Public (maui-pr): Unchanged — already uses _BuildOfficialId
  • PR builds: Unchanged — already uses _BuildOfficialId
  • Publishing and signing args are untouched

Copilot AI review requested due to automatic review settings March 10, 2026 15:55
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 10, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34409

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34409"

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

Fixes the dotnet-maui-build internal pipeline failure caused by the new BUILD.BUILDNUMBER format containing a +, which breaks Arcade’s MSBuild arithmetic on OfficialBuildId.

Changes:

  • Switch _OfficialBuildIdArgs to use _BuildOfficialId (yyyyMMdd.counter) instead of BUILD.BUILDNUMBER.
  • Keep signing/publishing-related arguments unchanged.

You can also share your feedback on Copilot code review. Take the survey.

The dotnet-maui-build internal pipeline has been failing since ~Jan 27
because BUILD.BUILDNUMBER changed to '10.0.50+azdo.XXXXX' format which
contains a '+' character. Arcade's Version.BeforeCommonTargets.targets
tries to do math on this value using [MSBuild]::Add/Multiply/Subtract
and fails with MSB4186.

Switch to using _BuildOfficialId (yyyyMMdd.counter format) which is
already used by all other pipeline configurations and is compatible
with Arcade's version computation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen PureWeen force-pushed the fix/internal-build-officialid branch from 65bfacb to c2b7898 Compare March 10, 2026 17:58
@PureWeen
Copy link
Copy Markdown
Member Author

Root Cause Analysis

The internal pipeline (dotnet-maui-build, definition 1536) has been failing since ~Jan 26, 2026 with MSB4186: Invalid static method invocation syntax during Arcade version computation.

What broke it

PR #33209 ("Restore OfficialBuildId for proper CI versioning", Jan 21) correctly updated the default, public, and PR conditional blocks in variables.yml to use $(_BuildOfficialId) (which resolves to yyyyMMdd.counter format). However, the internal block (lines 52-64, for dotnet-maui/dotnet-maui-build) was not updated and still used $(BUILD.BUILDNUMBER).

When the pipeline build number format subsequently changed to 10.0.50+azdo.{buildId}, the + character broke Arcade SDK's [MSBuild]::Add()/Multiply()/Subtract() calls in Version.BeforeCommonTargets.targets, which expect a numeric yyyyMMdd.counter input.

Timeline

Fix

Changed the internal block to use $(_BuildOfficialId) — the same variable every other conditional block already uses. Added inline comment to prevent future regression.

@rmarinho rmarinho merged commit 5c2c57f into main Mar 11, 2026
31 checks passed
@rmarinho rmarinho deleted the fix/internal-build-officialid branch March 11, 2026 15:20
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.

3 participants