[ci] Fix internal pipeline OfficialBuildId format#34409
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34409Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34409" |
There was a problem hiding this comment.
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
_OfficialBuildIdArgsto use_BuildOfficialId(yyyyMMdd.counter) instead ofBUILD.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>
65bfacb to
c2b7898
Compare
Root Cause AnalysisThe internal pipeline ( What broke itPR #33209 ("Restore OfficialBuildId for proper CI versioning", Jan 21) correctly updated the default, public, and PR conditional blocks in When the pipeline build number format subsequently changed to Timeline
FixChanged the internal block to use |
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-buildinternal pipeline (definition 1536) has been failing on every single build since ~Jan 27 (~5+ weeks) becauseBUILD.BUILDNUMBERchanged format to10.0.50+azdo.XXXXX.Arcade's
Version.BeforeCommonTargets.targetstries to do arithmetic onOfficialBuildIdusing[MSBuild]::Add/Multiply/Subtract, but the+character in the new format causesMSB4186: Invalid static method invocation syntax.Fix
Change the internal pipeline's
_OfficialBuildIdArgsfrom$(BUILD.BUILDNUMBER)to$(_BuildOfficialId)(theyyyyMMdd.counterformat already used by all other pipeline configurations).Impact
dotnet-maui-build): Fixed — uses_BuildOfficialId(yyyyMMdd.counter)maui-pr): Unchanged — already uses_BuildOfficialId_BuildOfficialId