Fix GenerateMsiVersion task parameter names to match targets file#442
Open
marcpopMSFT wants to merge 1 commit into
Open
Fix GenerateMsiVersion task parameter names to match targets file#442marcpopMSFT wants to merge 1 commit into
marcpopMSFT wants to merge 1 commit into
Conversation
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>
There was a problem hiding this comment.
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
GenerateMsiVersiontask properties toBuildNumber,Major,Minor, andPatch. - Updated the task implementation to map
BuildNumberto the underlyingVersion.CommitCountfield.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
This is the fix copilot suggested for fixing the arcade PR. it suggested doing a separate PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
GenerateMSIs.targetsfile passesBuildNumber,Major,Minor, andPatchparameters to theGenerateMsiVersiontask, but the C# task class incore-sdk-taskshad different property names (CommitCount,VersionMajor,VersionMinor,VersionPatch).Root Cause
Previously, this mismatch was hidden because the arcade-provided
GenerateMsiVersiontask (fromMicrosoft.DotNet.Build.Tasks.Installers) was being selected by MSBuild at runtime. However, the latest arcade SDK update (PR #440) addsRuntime="NET" Architecture="*"qualifiers to itsUsingTaskdeclarations (workaround for msbuild#13739), which changes MSBuild task resolution priority and causes the localcore-sdk-tasksversion to be selected instead, exposing the parameter name mismatch.Fix
Renamed the C# properties in
GenerateMsiVersion.csto match what the targets file passes:CommitCountBuildNumberVersionMajorMajorVersionMinorMinorVersionPatchPatchThis unblocks PR #440 (arcade dependency update).