Skip to content

Migrate nuget-msi-convert to v5.yml (WiX 6) - #11743

Merged
jonathanpeppers merged 5 commits into
mainfrom
jonathanpeppers-test-v5-nuget-msi-convert
Jun 30, 2026
Merged

Migrate nuget-msi-convert to v5.yml (WiX 6)#11743
jonathanpeppers merged 5 commits into
mainfrom
jonathanpeppers-test-v5-nuget-msi-convert

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Jun 25, 2026

Copy link
Copy Markdown
Member

Migrates dotnet/android's signed pipeline from the WiX 3 nuget-msi-convert/v4.yml template to the WiX 6 v5.yml template (Microsoft.Wix 6.0.3-dotnet.4).

Changes

Switches the nuget-msi-convert template reference from nuget-msi-convert/job/v4.yml@yaml-templates to nuget-msi-convert/job/v5.yml@yaml-templates, and updates an adjacent comment. All other consumers of yaml-templates@main (sign-artifacts, policheck, build-summary) are unchanged — this is a single-template swap.

Related Xamarin.yaml-templates work (all merged to main)

Intermediate fix commits that landed inside #752740 before it merged:

  • baf73ec — Build convert.proj with Core MSBuild (DotNetCoreCLI@2), not desktop msbuild
  • 981d2a6 — Pass absolute paths to CreateVisualStudioWorkload
  • d8a73d8 — Rename WixPackageVersionMicrosoftWixToolsetSdkVersion (arcade-canonical)

What changed in v5 vs v4 (for reviewer context)

  • WiX packages bumped to 6.0.3-dotnet.4 (was WiX 3)
  • swixBuildPackageVersion: 1.1.922 (was 1.1.392)
  • arcadePackageVersion: 11.0.0-beta.26325.102 (was 9.0.0-beta.24509.3)
  • arcadeTasksFxVersion: net (was netcoreapp3.1)
  • dotNetSdkVersion: 10.0.x (was 9.0.x — required; arcade 11.x tasks are net10.0)
  • convert.proj now built with DotNetCoreCLI@2 / dotnet msbuild (Core MSBuild) instead of MSBuild@1 desktop msbuild, because arcade 11.x workload tasks ship only tools/net/ (.NETCoreApp v10). SwixBuild still uses desktop msbuild via the internal _FindMSBuild target.
  • WiX property renamed WixPackageVersionMicrosoftWixToolsetSdkVersion (arcade-canonical, matches dotnet/dotnet VMR).

All new parameters have sensible defaults in v5.yml, so dotnet/android does not need to override any of them.

End-to-end CI validation (build 14529573)

Internal Xamarin.Android signed build against this branch succeeded. The Convert NuGet to MSI job produced:

  • 39 signed .msi installers = 13 workload packages × 3 host architectures (x86/x64/arm64)
  • 39 wrapping *.msi.<arch>.<version>.nupkg packages, all MicroBuild-verified (Certificate : Passed)
  • VS-insertion manifest pack: microsoft.net.sdk.android.manifest-11.0.100-preview.7

MSI / nupkg spot-check (Microsoft.Android.Sdk.Windows.Msi.x64)

  • MSI Summary Information CreatedBy field (PID 18): WiX Dev Build (6.0.3.4) — confirms WiX 6 toolset.
  • MSI dependency-provider table renamed from WixDependencyProvider (WiX 3) → Wix4DependencyProvider (WiX 4+ versioned name), populated with the correct ProviderKey: Microsoft.Android.Sdk.Windows,<version>,x64.
  • SWIX-generated data/msi.json inside the nupkg has identical schema to the WiX 3 baseline (36.99.0-preview.5.308), with ProviderKeyName correctly extracted in canonical PackageName,Version,Arch form. New RelatedProducts array additionally surfaces WIX_UPGRADE_DETECTED / WIX_DOWNGRADE_DETECTED upgrade metadata — feature gain, not a regression.

jonathanpeppers and others added 2 commits June 29, 2026 11:50
Smoke-test the WiX 3 -> WiX 6.0.3-dotnet.4 migration of the

nuget-msi-convert template in Xamarin.yaml-templates

(PR #752740, branch jonathanpeppers-nuget-msi-convert-v5).

Adds a temporary second repository resource `yaml-templates-v5` pinned

to the feature branch, and switches the nuget-msi-convert template

reference from `v4.yml@yaml-templates` to `v5.yml@yaml-templates-v5`.

All other templates (sign-artifacts, policheck, build-summary) continue

to consume yaml-templates@main, so this is a single-template swap.

Not to be merged: revert once the Xamarin.yaml-templates v5 PR lands.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Instead of cloning the yaml-templates resource into a second entry,

point the existing one at the v5 feature branch. The other templates

(sign-artifacts/v4.yml, security/policheck/v3.yml, build-summary/v1.yml)

are present on the feature branch too, so this is safe for the smoke test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers
jonathanpeppers force-pushed the jonathanpeppers-test-v5-nuget-msi-convert branch from 30c9579 to 9d86333 Compare June 29, 2026 16:50
jonathanpeppers and others added 2 commits June 30, 2026 07:50
The WiX 6 migration of nuget-msi-convert (Xamarin.yaml-templates
PR #752740) has merged to main, so we can drop the temporary
feature-branch pin.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Xamarin.yaml-templates PR #754224 adds a fallback for
BundledNETCoreAppTargetFramework on .NET 10 SDK (which only defines
the *Version* property). Without this, the inner msi.csproj builds
in _GenerateManifestsAndMsiNuGets fail with NETSDK1013.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers

Copy link
Copy Markdown
Member Author

Local validation on jonathanpeppers-nuget-msi-convert-v5-bundledtfm (Xamarin.yaml-templates PR #754224, commit bda1bf2):

✅ With .NET SDK 10.0.301 pinned to match CI, dotnet msbuild convert.proj /restore /t:Build;_GenerateManifestsAndMsiNuGets now completes the inner msi.csproj Restore;Pack step — the one that died on build 14528840 with NETSDK1013: TargetFramework value '' was not recognized — and produces 35 msi-nupkgs (~287 MB) against the nuget-unsigned artifact from build 14516944.

The synthesized $(BundledNETCoreAppTargetFramework)=net10.0 flows correctly into the templated <TargetFramework> via the <MSBuild Properties=...> forwarder in convert.proj.

Ready for an internal re-queue against this branch.

@jonathanpeppers
jonathanpeppers marked this pull request as ready for review June 30, 2026 14:41
Copilot AI review requested due to automatic review settings June 30, 2026 14:41

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 updates the Azure DevOps pipeline definition used by dotnet/android to smoke-test the nuget-msi-convert template’s WiX 6 migration by switching from v4.yml to v5.yml and (currently) pinning the yaml-templates repository resource to a feature branch.

Changes:

  • Pin DevDiv/Xamarin.yaml-templates pipeline resource to a feature branch.
  • Switch nuget-msi-convert job template from v4.yml to v5.yml.
  • Update the inline comment referencing which template produced the drop consumed later in the pipeline.

Comment thread build-tools/automation/azure-pipelines.yaml Outdated
Comment thread build-tools/automation/azure-pipelines.yaml
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers jonathanpeppers changed the title [WIP] Test v5 nuget-msi-convert (WiX 6 migration) Test v5 nuget-msi-convert (WiX 6 migration) Jun 30, 2026
@jonathanpeppers jonathanpeppers changed the title Test v5 nuget-msi-convert (WiX 6 migration) Migrate nuget-msi-convert to v5.yml (WiX 6) Jun 30, 2026
@jonathanpeppers

Copy link
Copy Markdown
Member Author

End-to-end validation succeeded on build 14529573 (still running other test stages, but the Convert NuGet to MSI job completed its work cleanly):

  • Restore convert.proj
  • Generate MSIs and VS Manifests — the exact task that died with NETSDK1013 on build 14528840
  • Sign NUPKG files
  • verify signed msi content
  • Copy nuget-signed to nugets drop directory
  • Copy bin\msi-nupkgs to nugets drop directory

Remaining steps in that job are Guardian/SDL scanning, SBoM, and 1ES post-job cleanup — not blockers.

@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jun 30, 2026
@jonathanpeppers

Copy link
Copy Markdown
Member Author

Artifact validation against build 14529573:

Pulled the verify signed msi content task log and confirmed the produced artifact set is complete and correct:

  • 39 signed .msi installers = 13 distinct workload packages × 3 host architectures (x86/x64/arm64)
  • 39 corresponding signed .msi.<arch> NuGet packages wrapping each MSI
  • Every MSI and every nupkg reported Certificate : Passed by MicroBuild; 0 failures, 0 exclusions
  • Sign NUPKG files step: Build succeeded, 0 errors

Coverage:

Component Packages
Reference assemblies microsoft.android.ref.37
Runtime (managed) microsoft.android.runtime.37.android
CoreCLR runtimes microsoft.android.runtime.coreclr.37.android-{arm64,x64}
Mono runtimes microsoft.android.runtime.mono.37.android-{arm,arm64,x64,x86}
NativeAOT runtimes microsoft.android.runtime.nativeaot.37.android-{arm64,x64}
Windows SDK pack microsoft.android.sdk.windows
Templates microsoft.android.templates
Workload manifest microsoft.net.sdk.android.manifest-11.0.100-preview.7

Versioning: 37.0.0-ci.jonathanpeppers-test-v5-nuget-msi-convert.100 — sane, branch-suffixed.

The presence of the workload manifest pack confirms the workload registration generation works end-to-end on the new WiX 6 toolchain. Output shape is functionally equivalent to what v4 produced; only the build infrastructure changed.

@jonathanpeppers
jonathanpeppers merged commit 986a32d into main Jun 30, 2026
42 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-test-v5-nuget-msi-convert branch June 30, 2026 20:22
jonathanpeppers added a commit to dotnet/macios that referenced this pull request Jun 30, 2026
Equivalent of dotnet/android#11743 for dotnet/macios.

Switches the nuget-msi-convert template reference from
nuget-msi-convert/job/v4.yml@yaml-templates to v5.yml@yaml-templates,
and updates the corresponding comment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jonathanpeppers added a commit to dotnet/macios that referenced this pull request Jul 1, 2026
Equivalent of dotnet/android#11743 for dotnet/macios.

Switches the nuget-msi-convert template reference from
nuget-msi-convert/job/v4.yml@yaml-templates to v5.yml@yaml-templates,
and updates the corresponding comment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rmarinho added a commit to dotnet/maui that referenced this pull request Jul 2, 2026
Replace Microsoft.Signed.WiX (WiX 3 candle/light) with Microsoft.Wix 6.0.3-dotnet.4
and its extension packages. Update CreateVisualStudioWorkload task invocation to use
WixExe/HeatExe/WixExtensions parameters from arcade 11.x.

Key changes:
- workloads.csproj: TFM to netstandard2.0, WiX 6 PackageRefs with ExcludeAssets,
  WixExe/HeatExe/WixExtensions properties and items
- Versions.props: Bump arcade tasks to 26330.112, add MicrosoftWixVersion
- NuGetVersions.targets: Replace Microsoft.Signed.WiX with 5 WiX 6 package pins
- sdk-insertion.yml: Remove outdated v4.yml reference

Follows the pattern established in dotnet/android#11743 and the
yaml-templates convert-v5/convert.proj reference implementation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
jonathanpeppers added a commit to dotnet/macios that referenced this pull request Jul 6, 2026
Equivalent of dotnet/android#11743 for dotnet/macios.

## Changes

- Switches the nuget-msi-convert template reference from
`nuget-msi-convert/job/v4.yml@yaml-templates` to
`nuget-msi-convert/job/v5.yml@yaml-templates` in
`tools/devops/automation/templates/release/vs-insertion-prep.yml`.
- Updates the corresponding comment from `v4.yml` to `v5.yml`.

## What changed in v5 vs v4 (for reviewer context)

- WiX packages bumped to `6.0.3-dotnet.4` (was WiX 3)
- `swixBuildPackageVersion: 1.1.922` (was 1.1.392)
- `arcadePackageVersion: 11.0.0-beta.26325.102` (was 9.0.0-beta.24509.3)
- `arcadeTasksFxVersion: net` (was `netcoreapp3.1`)
- `dotNetSdkVersion: 10.0.x` (was 9.0.x — required, arcade 11.x tasks
are net10.0)
- `convert.proj` now built with `DotNetCoreCLI@2 / dotnet msbuild` (Core
MSBuild) instead of `MSBuild@1` desktop msbuild, because arcade 11.x
workload tasks ship only `tools/net/` (.NETCoreApp v10). SwixBuild still
uses desktop msbuild via the internal `_FindMSBuild` target.

All new parameters have sensible defaults in `v5.yml`, so dotnet/macios
does not need to override any of them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rmarinho added a commit to dotnet/maui that referenced this pull request Jul 7, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Migrate workload MSI generation from WiX 3 (candle/light via
`Microsoft.Signed.WiX`) to WiX 6 (wix.exe via `Microsoft.Wix` +
extension packages).

Follows the pattern established in dotnet/android#11743 and the
yaml-templates `convert-v5/convert.proj` reference implementation.

## Related PRs

- dotnet/android#11743 — Android WiX 6 migration (reference
implementation)
- dotnet/dotnet#5265 — Arcade-level WiX 5/6 rewrite (deeper refactor of
`CreateVisualStudioWorkload` task internals)

## Changes

### `src/Workload/workloads.csproj`
- Target framework changed to `netstandard2.0` (avoids NU1212 —
`Microsoft.Wix` is a DotnetTool package type)
- Added `GenerateDependencyFile=false`
- Replaced `Microsoft.Signed.WiX` with WiX 6 packages (`Microsoft.Wix`,
`Microsoft.WixToolset.Heat`, and 3 wixext packages)
- `ExcludeAssets="all"` on `Microsoft.Wix` (required for DotnetTool
package type)
- Added `WixExe`, `HeatExe` properties and `WixExtensions` items  
- Updated `CreateVisualStudioWorkload` task invocation: `WixToolsetPath`
→ `WixExe`/`HeatExe`/`WixExtensions`
- Removed `UseWorkloadPackGroupsForVS` (no longer supported in arcade
11.x)

### `eng/Versions.props`
- Bumped arcade task packages to `11.0.0-beta.26330.112` (required for
WiX 6 task parameters)
- Added `MicrosoftWixVersion` = `6.0.3-dotnet.4`

### `eng/NuGetVersions.targets`
- Replaced `Microsoft.Signed.WiX` version pin with 5 WiX 6 package pins

### `eng/pipelines/common/sdk-insertion.yml`
- Removed outdated `v4.yml` comment

## Validation

✅ **Internal CI build
[#3013410](https://dev.azure.com/dnceng/internal/_build/results?buildId=3013410)
— PASSED**

### Artifact validation (matches dotnet/android#11743 acceptance
criteria):

1. **MSI table rename** ✅ — Built with `WiX Dev Build (6.0.3.4)`, uses
`Wix4DependencyProvider` table
2. **msi.json in MSI nupkg** ✅ — `ProviderKeyName` correctly populated
(e.g., `"Microsoft.Maui.Core,11.0.0-preview.7.26352.12,x64"`)
3. **RelatedProducts** ✅ — `WIX_UPGRADE_DETECTED` /
`WIX_DOWNGRADE_DETECTED` entries present (WiX 6 feature gain)
4. **VSDrop SWIX JSON** ✅ — All 3 VSDrop zips produced (components,
components-pre, packs), vsman files correctly reference MSI packages
with proper providerKey and install sizes

## Comparison with dotnet/dotnet#5265 (Arcade-level Rewrite)

The arcade PR (dotnet/dotnet#5265) performs a deeper refactor of the WiX
infrastructure. Here is how our approach compares:

| Aspect | MAUI (this PR) | SDK (dotnet/dotnet#5265) | Status |
|--------|----------------|--------------------------|--------|
| WiX packages | ✅ Same 5 packages | Same | Aligned |
| `WixExe`/`HeatExe`/`WixExtensions` | ✅ Correct | Same | Aligned |
| Arcade version | 26330.112 | Same+ | Aligned |
| SwixBuild package | `.Dotnet` 1.1.87 | Full variant 1.1.922 + desktop
MSBuild | **Diverges** — works today |
| SWIX build method | `<MSBuild>` task | `<Exec>` with desktop
`msbuild.exe` | **Diverges** — works today |
| `CreateWixPacks` | Not explicitly set (defaults to true) | Explicitly
set | Functionally equivalent |
| `LightCommandPackageDrop` | Never had it | Removed | N/A |

### Future considerations

1. **SwixBuild.Dotnet deprecation**: If
`MicroBuild.Plugins.SwixBuild.Dotnet` is deprecated, we will need to
switch to the full
`Microsoft.VisualStudioEng.MicroBuild.Plugins.SwixBuild` + desktop
MSBuild pattern (using `vswhere` to locate VS).
2. **Arcade dependency flow**: When the arcade version from
dotnet/dotnet#5265 ships, improvements to `CreateVisualStudioWorkload`
will flow to us automatically — no code changes needed in MAUI unless
the task API changes.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rmarinho <1235097+rmarinho@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants