From 27d07bf58db629899009d9d72c72614a1ad3f902 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Wed, 10 Jun 2026 15:43:05 -0700 Subject: [PATCH] Fix GenerateMsiVersion task parameter names to match targets file 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> --- src/core-sdk-tasks/GenerateMsiVersion.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core-sdk-tasks/GenerateMsiVersion.cs b/src/core-sdk-tasks/GenerateMsiVersion.cs index 3c03a0a0..25605f8b 100644 --- a/src/core-sdk-tasks/GenerateMsiVersion.cs +++ b/src/core-sdk-tasks/GenerateMsiVersion.cs @@ -9,16 +9,16 @@ namespace Microsoft.DotNet.Cli.Build public class GenerateMsiVersion : Task { [Required] - public int CommitCount { get; set; } + public int BuildNumber { get; set; } [Required] - public int VersionMajor { get; set; } + public int Major { get; set; } [Required] - public int VersionMinor { get; set; } + public int Minor { get; set; } [Required] - public int VersionPatch { get; set; } + public int Patch { get; set; } [Output] public string MsiVersion { get; set; } @@ -27,10 +27,10 @@ public override bool Execute() { var buildVersion = new Version() { - Major = VersionMajor, - Minor = VersionMinor, - Patch = VersionPatch, - CommitCount = CommitCount + Major = Major, + Minor = Minor, + Patch = Patch, + CommitCount = BuildNumber }; MsiVersion = buildVersion.GenerateMsiVersion();