[ci-fix-net11] Remove obsolete UseWebAssemblyDebugging from Blazor solution template (refs #36846) - #36855
Conversation
…lution template The Blazor Web solution template called app.UseWebAssemblyDebugging() and set inspectUri in launchSettings under the UseWebAssembly parameter. That API is obsolete as of .NET 11 (ASPDEPR011), breaking the template build. Since the dev branch no longer contributes any WebAssembly-only setup, narrow the guard to IndividualLocalAuth and drop the inspectUri entries. Refs: #36846 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
♻️ Attempt 1/10: the red on this PR is unrelated flake, not caused by this fix, on
The original Automated CI-fix note. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
🎯 Target test validated green on Automated CI-fix readiness gate. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
BlazorTemplateTest.BuildMauiBlazorWebSolution variants validated green on all platforms they run (Blazor macOS + Blazor windows legs) on head 06dc002 (buildId 1529150); remaining red is unrelated flake. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
This comment has been minimized.
This comment has been minimized.
AI Review Summary
🗂️ Review Sessions — click to expand🚦 Gate — Test Before & After FixGate Result:
|
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #36855 | Remove obsolete UseWebAssemblyDebugging() and inspectUri; narrow development branch to IndividualLocalAuth only. |
Program.cs, Program.Main.cs, launchSettings.json |
Original PR; targeted CI comments report Blazor template tests green. |
🔬 Code Review — Deep Analysis
Code Review — PR #36855
Independent Assessment
What this changes: Removes obsolete Blazor WASM debugging middleware and inspectUri from MAUI Blazor solution templates.
Inferred motivation: Avoid .NET 11 ASPDEPR011 build failures.
Reconciliation with PR Narrative
Author claims: UseWebAssemblyDebugging() and inspectUri are obsolete/removed in .NET 11; IDEs now launch debugging directly.
Agreement/disagreement: Agrees. Initial expert concern about losing debugging support is resolved by .NET 11 guidance requiring both removals.
Prior Review Reconciliation
No prior ❌ Error findings found.
CI Status
- Required-check result:
gh pr checksunavailable (gh auth loginrequired) - AzDO:
maui-prbuild 1529150 failed, but Blazor template legs passed; remaining failures reported/classified as unrelated infra/sample/Helix issues. - Classification: confirmed PR-unrelated red, with tool gap
- Action taken: invoked
azdo-build-investigator; confidence capped low
Findings
No ❌ Errors,
Failure-Mode Probing
- WebAssembly without auth: no dev-only middleware remains; per .NET 11 this is expected.
- Individual auth:
UseMigrationsEndPoint()path preserved. - launch profiles: removing
inspectUrimatches required .NET 11 migration.
Verdict: LGTM
Confidence: low
Summary: The code change matches the documented .NET 11 breaking change and targeted Blazor template CI passed. Confidence is low only because gh pr checks --required could not run authenticated and overall AzDO remains red from unrelated failures.
🛠️ Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix-1 | Add UseLegacyWebAssemblyDebugging computed symbol and gate obsolete artifacts false for net11. |
4 files | Integration blocked by local workload provisioning; not better due stale deny-list/template complexity. | |
| 2 | try-fix-2 | Add net11-only file-level template variants selected by source modifiers. | 0 files | Rejected at expert self-review as duplicate-file drift risk and not viable for a net11-only branch. | |
| 3 | try-fix-3 | Inline allow-list obsolete artifacts for UseWebAssembly && Framework == "net10.0". |
3 files | Deterministic syntax checks passed; integration blocked; not better because it preserves dead legacy code. | |
| PR | PR #36855 | Delete obsolete UseWebAssemblyDebugging() and inspectUri; narrow dev branch to IndividualLocalAuth. |
3 files | Simpler, aligns with .NET 11 guidance, and avoids dead template branches. |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| maui-expert-reviewer | 1 | Yes | Candidate 1: target-framework-gated legacy debugging emission. |
| maui-expert-reviewer | 2 | Yes | Candidate 2: net11 file-level template fork. Rejected before implementation due drift/complexity. |
| maui-expert-reviewer | 3 | Yes | Candidate 3: inline legacy TFM allow-list. |
| maui-expert-reviewer | 4 | No | Remaining variants are either warning suppression, dead-code preservation, duplicate-file forks, or trivial rewrites of the PR's direct removal. |
Exhausted: Yes
Selected Fix: PR #36855 — The PR's direct removal is the simplest and most robust option for a net11 template branch. No alternative candidate passed integration locally, and the alternatives that can be reasoned about are more complex or retain obsolete/dead template code.
🏁 Report — Final Recommendation
Comparative Fix Report — PR #36855
Candidates Compared
| Candidate | Approach | Regression/Test Result | Ranking Notes |
|---|---|---|---|
pr |
Remove UseWebAssemblyDebugging() and inspectUri; narrow the development branch to IndividualLocalAuth. |
Gate skipped because no tests were detected; prior PR-state context reports the target Blazor template CI legs passed and remaining red was unrelated. | Best: simplest direct .NET 11 fix, no obsolete/dead template artifacts retained. |
pr-plus-reviewer |
Same as pr; expert reviewer found no actionable inline findings to apply. |
Same as pr. |
Tied technically with pr, but not a distinct improvement because no review changes were applied. |
try-fix-1 |
Add UseLegacyWebAssemblyDebugging = UseWebAssembly && Framework != "net11.0" and keep legacy debugging artifacts for non-net11 output. |
Blocked: integration could not run because local workload installation failed (Workload ID maui is not recognized). |
Lower than PR: adds template complexity and future-staleness risk by enabling obsolete debugging for later TFMs unless updated. |
try-fix-2 |
Add net11-only file-level template variants selected by source modifiers. | Not run; abandoned before implementation. | Lower than PR: duplicate template files increase drift risk and source-modifier matrix fragility. |
try-fix-3 |
Inline allow-list obsolete debugging artifacts for UseWebAssembly && Framework == "net10.0". |
Blocked: integration could not run because local MAUI SDK packs were unavailable; deterministic checks passed. | Lower than PR: safer than try-fix-1, but still preserves dead legacy debugging code in a net11 branch. |
Winner
Winning candidate: pr
The raw PR fix wins because it directly removes the obsolete API and matching launch profile debugging affordance from the .NET 11 template. pr-plus-reviewer is equivalent but has no applied reviewer delta, while every try-fix candidate is either unimplemented, blocked, more complex, or preserves obsolete/dead template branches. No candidate had passing locally executed regression tests, so the ranking is based on the available PR-state CI evidence, deterministic review, and implementation risk.
Rationale
The issue is specific to .NET 11 template output producing ASPDEPR011 for UseWebAssemblyDebugging(). Keeping the obsolete debugging path behind additional template conditions does not improve the net11 branch and creates future maintenance risk. Removing both the middleware call and inspectUri is consistent across the two program variants and launch profiles, and narrowing the development branch preserves the only remaining development-only middleware (UseMigrationsEndPoint()) for Individual Local Auth.
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
Workflow artifact: ci-fix
Artifact kind: fix
Refs: #36846
Target branch: net11.0
Attempt: 1/10
Attempt 1 of 10
Remove the obsolete
app.UseWebAssemblyDebugging()call (and its companioninspectUridebug config) from the Blazor Web solution template so the generated project builds clean on .NET 11.Root cause
The
maui-blazor-solutiontemplate'sMauiApp.1.Web/Program.csandProgram.Main.csemittedapp.UseWebAssemblyDebugging();inside the#if (UseWebAssembly)development block, andProperties/launchSettings.jsonset the matchinginspectUri.UseWebAssemblyDebugging()is obsolete as of .NET 11 and surfaces as build diagnostic ASPDEPR011, breakingdotnet newtemplate builds for WebAssembly configurations (repro builds 1528586 / 1528665).Fix
Removed the
UseWebAssemblyDebugging()call from bothProgram.csandProgram.Main.cs. Because WebAssembly no longer contributes any development-only pipeline step, the guard is narrowed from#if (UseWebAssembly || IndividualLocalAuth)to#if (IndividualLocalAuth), preserving the existingUseMigrationsEndPoint()behavior for the Individual Local Auth configuration and theelse/non-development branch for all others. The obsoleteinspectUrientries were removed from bothhttpandhttpslaunch profiles. This mirrors the equivalent change in the ASP.NET Core .NET 11 Blazor Web templates.What is unverified / where I need help
dotnet newtemplate instantiation + build across every parameter permutation (UseWebAssemblyxIndividualLocalAuthx http/https/LocalhostTld) was not run in this environment; CI template integration tests should exercise these.Validation
not run because template instantiation/build is exercised by CI integration tests, not locally available hereEvidence
Filed by
ci-status-fix-net11. This is the single PR for #36846: the workflow watches its own CI and pushes up to 10 attempts on this same PR (it never opens a second PR). It advances only when the fix's own build settles red and that red is caused by the fix. In round 1 a maintainer still needs to comment/azp run maui-prto exercise the new commit.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpgSee Network Configuration for more information.