Skip to content

Fix GenerateMsiVersion task parameter names to match targets file#442

Open
marcpopMSFT wants to merge 1 commit into
mainfrom
fix/generatemsiversion-params
Open

Fix GenerateMsiVersion task parameter names to match targets file#442
marcpopMSFT wants to merge 1 commit into
mainfrom
fix/generatemsiversion-params

Conversation

@marcpopMSFT

Copy link
Copy Markdown
Member

Summary

The GenerateMSIs.targets file passes BuildNumber, Major, Minor, and Patch parameters to the GenerateMsiVersion task, but the C# task class in core-sdk-tasks had different property names (CommitCount, VersionMajor, VersionMinor, VersionPatch).

Root Cause

Previously, this mismatch was hidden because the arcade-provided GenerateMsiVersion task (from Microsoft.DotNet.Build.Tasks.Installers) was being selected by MSBuild at runtime. However, the latest arcade SDK update (PR #440) adds Runtime="NET" Architecture="*" qualifiers to its UsingTask declarations (workaround for msbuild#13739), which changes MSBuild task resolution priority and causes the local core-sdk-tasks version to be selected instead, exposing the parameter name mismatch.

Fix

Renamed the C# properties in GenerateMsiVersion.cs to match what the targets file passes:

Old name New name
CommitCount BuildNumber
VersionMajor Major
VersionMinor Minor
VersionPatch Patch

This unblocks PR #440 (arcade dependency update).

The GenerateMSIs.targets file passes BuildNumber, Major, Minor, and Patch
parameters to the GenerateMsiVersion task, but the C# task class had different
property names (CommitCount, VersionMajor, VersionMinor, VersionPatch).

Previously, this mismatch was hidden because the arcade-provided
GenerateMsiVersion task (from Microsoft.DotNet.Build.Tasks.Installers) was
being selected by MSBuild at runtime. However, the latest arcade SDK update
(PR #440) adds Runtime=\"NET\" Architecture=\"*\" qualifiers to its UsingTask
declarations, which changes MSBuild task resolution priority and causes the
local core-sdk-tasks version to be selected instead, exposing the mismatch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 11, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Aligns the GenerateMsiVersion MSBuild task’s parameter/property names with what GenerateMSIs.targets passes, preventing MSBuild from selecting the local task with incompatible parameter names after the arcade SDK update changes task resolution behavior.

Changes:

  • Renamed GenerateMsiVersion task properties to BuildNumber, Major, Minor, and Patch.
  • Updated the task implementation to map BuildNumber to the underlying Version.CommitCount field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marcpopMSFT

Copy link
Copy Markdown
Member Author

This is the fix copilot suggested for fixing the arcade PR. it suggested doing a separate PR.

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