Skip to content

Move BuildNumber property set into target - #8309

Merged
ViktorHofer merged 2 commits into
mainfrom
ViktorHofer-patch-1
Aug 14, 2026
Merged

ViktorHofer merged 2 commits into
mainfrom
ViktorHofer-patch-1

Conversation

@ViktorHofer

Copy link
Copy Markdown
Member

Fixes #8308

The _PatchNumber property isn't available at that point during evaluation. Move into a target to gain access to it.

Fixes #8308

The _PatchNumber property isn't available at that point during evaluation. Move into a target to gain access to it.
Copilot AI lite review requested due to automatic review settings August 14, 2026 12:51
@ViktorHofer
ViktorHofer requested review from a team as code owners August 14, 2026 12:51
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 addresses #8308 by deferring NuGet client BuildNumber argument composition until target execution time, so $(_PatchNumber) is available when calculating the modulo-based build number used for versioning.

Changes:

  • Moves the /p:BuildNumber=... addition to BuildArgs from project evaluation into a new target that runs before SetBuildProperties.
  • Keeps the existing modulo logic for mapping .NET patch numbers into NuGet’s preview iteration space.
Show a summary per file
File Description
repo-projects/nuget-client.proj Moves BuildArgs BuildNumber calculation into a pre-SetBuildProperties target so $(_PatchNumber) is available.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread repo-projects/nuget-client.proj Resolved
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@ViktorHofer
ViktorHofer enabled auto-merge (squash) August 14, 2026 12:58
@ViktorHofer
ViktorHofer merged commit 83287a8 into main Aug 14, 2026
11 checks passed
@ViktorHofer
ViktorHofer deleted the ViktorHofer-patch-1 branch August 14, 2026 15:10
AlesProkop added a commit that referenced this pull request Nov 16, 2026
nuget-client got no BuildNumber in VMR builds because the property was
evaluated before _PatchNumber is defined, so all NuGet packages were
versioned rc.65534 and promotion failed with "already exists ... with
different content" on dotnet-tools. This also takes the modulo 100000
change so the number doesn't wrap on October 1st.

Co-authored-by: Copilot App <[email protected]>
AlesProkop added a commit that referenced this pull request Nov 16, 2026
nuget-client got no BuildNumber in VMR builds because the property was
evaluated before _PatchNumber is defined, so all NuGet packages were
versioned rc.65534 and promotion failed with "already exists ... with
different content" on dotnet-tools. This also takes the modulo 100000
change so the number doesn't wrap on October 1st.

Co-authored-by: Copilot App <[email protected]>
akoeplinger pushed a commit that referenced this pull request Nov 16, 2026
akoeplinger pushed a commit that referenced this pull request Nov 16, 2026
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.

[Operational Issue]: Publishing failure - nuget assets version calculation doesn't work

3 participants