Skip to content

[net11.0][Windows] Release MSIX dependency locks during Helix deployment - #39573

Closed
kubaflo wants to merge 1 commit into
net11.0from
kubaflo-net11-msix-deployment-port
Closed

kubaflo wants to merge 1 commit into
net11.0from
kubaflo-net11-msix-deployment-port

Conversation

@kubaflo

@kubaflo kubaflo commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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 from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Superseded by #39536. This exact test-infrastructure fix is now included in the consolidated PR at 63ef2602a7b7350595f10236097056991a55550e, with identical file contents and preserved attribution. This standalone PR is being closed without merging. The per-fix evidence below remains historical evidence for this PR's original head, not new native validation of the combined head; combined-head checks and pending CI are documented in #39536.

Targets net11.0 explicitly. Forward-port only the proven two-file fix from
#39498, merged into release/11.0.1xx
as 293e5cc84fb750732aa6621b1519113814e49506; no GA branch history, packaging,
SDK, or dependency changes are imported.

The Helix Windows runner installs a packaged test application and its x64 MSIX
dependencies together. In both device build 1644557
for #39536 and its
exact-base build 1643729
(216c8045cbfa9d6a00f44ec2dad574ca1b9ec13e), Controls, Core, Essentials, and
BlazorWebView packaged work items fail before tests with 0x80073D02.
MicrosoftWindows.Client.WebExperience_526.17301.80.9_x64__cw5n1h2txyewy holds
resources used by Microsoft.WindowsAppRuntime.2.msix; those four items produce
no result XML. Successful unpackaged or Graphics-only execution does not cover
the blocked deployment routes.

Set ForceApplicationShutdown = $true on the existing Add-AppxPackage
parameter splat. Microsoft's contract
covers processes associated with the package or its dependencies;
ForceTargetApplicationShutdown covers only the target. This is limited to
disposable Helix workers, not local developer deployment in windows.cake.
The CI facts document records that distinction.

Dependency architecture selection, certificate handling, the single installation
operation, terminating errors/nonzero deployment failure, Appx diagnostics,
cleanup, and test execution are unchanged. No broad process killing, sleeps,
retries, deferred registration, or fixture/pipeline changes are introduced.
#39549's separate setup-retry work is
not imported; its CI-facts section is distinct.

Patch identity and syntax validation

  • git diff HEAD^ HEAD --check - passed.
  • git show --format= HEAD | git patch-id --stable and
    git show --format= 293e5cc84fb750732aa6621b1519113814e49506 | git patch-id --stable
    both produce 4d1a2fe75762a55516e43db58a4a33e107d78962.
  • git diff 293e5cc84fb750732aa6621b1519113814e49506 HEAD -- eng/devices/run-windows-devicetests.cmd
    • empty; the entire runner blob is identical to the merged source fix.
  • Parsed the actual embedded installation PowerShell with
    System.Management.Automation.Language.Parser.ParseInput - zero syntax errors
    using the command below. No tests for pipeline/configuration were added.
Exact embedded PowerShell syntax-check command (passed)
pwsh -NoLogo -NoProfile -Command - <<'PS'
$ErrorActionPreference = 'Stop'
$text = Get-Content -Raw 'eng/devices/run-windows-devicetests.cmd'
$match = [regex]::Match($text, '(?m)^    powershell -NoProfile -Command \^\r?\n(?<body>(?:        ".*\r?\n)+)')
if (-not $match.Success) { throw 'Packaged installation PowerShell block was not found' }
$code = ($match.Groups['body'].Value -split '\r?\n' | Where-Object { $_.Trim() } | ForEach-Object { ($_ -replace '^\s*"', '' -replace '"(?: \^)?$', '') -replace '\\"', '"' }) -join "`n"
$tokens = $null
$parseErrors = $null
$null = [System.Management.Automation.Language.Parser]::ParseInput($code, [ref]$tokens, [ref]$parseErrors)
if ($parseErrors.Count -ne 0) { $parseErrors | Format-List; throw "$($parseErrors.Count) PowerShell syntax errors" }
Write-Output $code
Write-Output 'Embedded packaged-installation PowerShell: zero syntax errors'
PS

Hosted Windows validation

Scoped device build 1645745
used exact head 7673773370d3c142e0c89545f72feda4479babf1 on net11 base
7b0ea7800db3f3faccbaecb665d32b7c61eaf932, pipeline maui-pr-devicetests
(314, revision 7). The actual timeline confirms seven non-Windows stages skipped.
The Windows build stage succeeded; the Windows run stage is red on the three
pre-existing Label assertions in each configuration
, not deployment.

Submission log 33
identifies Helix job 768b21f4
and records all ten application work items finished. The administrative queueing
item is excluded from test counts.

All five packaged applications installed and executed, including all four
routes previously blocked by deployment. All 52 packaged launcher invocations
(Controls discovery + 47 categories, and four other suites) exited 0. No
0x80073D02, WebExperience lock, missing-result, crash, or timeout signature
appears in the ten complete work-item consoles.

Packaged suite (console) Passed Failed Skipped
Controls 971 3 33
Core 2,033 0 111
Essentials 312 0 14
Graphics 33 0 0
BlazorWebView 40 0 4
Total 3,389 3 162

Every work item's actual source and aggregate XML was downloaded and parsed:
112 files = ten aggregates + 102 source/category files. Assembly and collection
declarations agree with actual records; source/aggregate test multisets reconcile
exactly; no assembly/collection errors, unknown outcomes, or unreadable files
were found. Both Controls configurations have all 47 expected category XMLs;
FlexLayout explicitly declares zero tests rather than being absent.

Unpackaged suites separately produced the same totals (3,389 passed / 3 failed /
162 skipped), not used as a proxy for packaged coverage. Eight app items exited 0;
both Controls items exited 1 for these same three Label cases:

  • ContainerHitTestingIsRestoredWhenHandlerReconnects
  • ReconnectingContainerPreservesDetachedWrapper
  • ReconnectingContainerPreservesWrapperInDifferentPanel

All six execution failures match the actual unpackaged Label XML in
baseline build 1643729
(baseline work item):
same test identities, Xunit.Sdk.SameException, byte-equal messages, and stack
frames. Unpackaged stacks are byte-equal; packaged stacks omit source-file/line
suffixes. Baseline packaged Controls had no XML because installation failed.
These assertions are not fixed or skipped by this PR; the whole suite is not
green
.

Evidence limits: deployment and execution on different workers do not prove
the original WebExperience lock was present, that Windows terminated that exact
process, or that the flag was necessary in a particular successful run. No
forced-lock experiment, whole-net11 readiness claim, or local Windows/macOS
desktop automation is claimed. This fixes one pre-test coverage blocker, not
all failures reported on #39536, and does not modify that GC PR.

Issues Fixed

Fixes #39464

Related: #39536 (packaged-device execution blocked independently of its GC changes).

Port the runner shutdown flag and CI facts from #39498 without importing GA history. Keep dependency-process shutdown limited to disposable Helix workers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7c8b0ad3-c2a6-4fef-bd2a-0a06d36b7505
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 22, 2026 19:25 — with GitHub Actions Inactive
Copilot AI balanced review requested due to automatic review settings October 22, 2026 19:25
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39573

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39573"

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 22, 2026 19:26 — with GitHub Actions Inactive
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
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.

🔵 Needs a closer look

Human confirmation of the reported Windows validation and current required checks is still needed because neither was independently verified.

No open issues 🎉

What changed in this PR

Forward-ports the Windows Helix deployment fix from #39498 to net11.0, addressing MSIX dependency locks that block packaged device tests before execution (#39464).

Changes:

  • Enables ForceApplicationShutdown on the existing package installation so Windows can close processes using the package or its dependencies.
  • Documents the disposable-worker scope; local developer deployment and existing failure handling remain unchanged.
File Description
eng/​devices/​run-windows-devicetests.cmd Enables dependency-aware application shutdown during packaged installation.
.github/​docs/​maui-ci-facts.md Documents dependency locks, shutdown behavior, and Helix-only scope.

Review effort: Balanced

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 22, 2026
@kubaflo kubaflo closed this Oct 22, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 76737733 Deployed Oct 22, 2026 by kubaflo via conclusion #2472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s/agent-review-in-progress AI review is currently running for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants