Skip to content

Fix BlazorGateway VS F5 launch (#66836) and E2E manifest task path (#66617)#66849

Merged
lewing merged 2 commits into
mainfrom
javiercn/preview5-fixes
Jun 1, 2026
Merged

Fix BlazorGateway VS F5 launch (#66836) and E2E manifest task path (#66617)#66849
lewing merged 2 commits into
mainfrom
javiercn/preview5-fixes

Conversation

@javiercn
Copy link
Copy Markdown
Member

Summary

Fixes two Preview 5 regressions in the Components area:

Fix #66836 — Blazor WASM Standalone App crashes on F5 in VS

Root cause: The BlazorGateway targets (introduced in #65982) set RunCommand/RunArguments inside a target (AfterTargets="ComputeRunArguments"). VS reads these as static properties during F5/Ctrl+F5 without running that target, so it falls back to launching the app DLL directly — which fails because the WASM runtimeconfig doesn't specify a framework.

Fix: Convert to static properties using $(IntermediateOutputPath) to construct the manifest paths at evaluation time, matching the pattern used by the old DevServer.

Fix #66617GenerateE2EManifest silently skipped (no manifest produced)

Root cause: The _E2ETasksAssembly path probe in Microsoft.AspNetCore.Components.Testing.targets uses $(MSBuildThisFileDirectory)tasks\... but in the NuGet package layout, MSBuildThisFileDirectory resolves to buildTransitive/net10.0/ — two levels below the package root tasks/ folder.

Fix: Updated probe to $(MSBuildThisFileDirectory)../../tasks/netstandard2.0/.... Also added a build warning when E2E app projects are declared but the task assembly can't be found, so future packaging regressions are caught loudly.

Testing

  • Reproduced both issues locally using nightly preview5 SDK (11.0.100-preview.5.26272.118)
  • Verified the Gateway targets now evaluate RunCommand/RunArguments as static properties
  • Verified the corrected path resolves to the actual task DLL in the NuGet package
  • Built affected projects successfully

Copilot AI review requested due to automatic review settings May 26, 2026 13:56
@javiercn javiercn requested a review from a team as a code owner May 26, 2026 13:56
@github-actions github-actions Bot added the area-blazor Includes: Blazor, Razor Components label May 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes two regressions affecting Blazor tooling in the Components area: Visual Studio F5/Ctrl+F5 launching for standalone WASM apps (BlazorGateway) and generation of E2E manifests when consuming Microsoft.AspNetCore.Components.Testing from NuGet.

Changes:

  • Updates BlazorGateway MSBuild targets to set RunCommand/RunArguments as evaluation-time properties so VS can see them without running ComputeRunArguments.
  • Fixes GenerateE2EManifest task assembly probing to match the actual NuGet package layout and adds a warning when E2E app projects are present but the task can’t be found.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Components/Testing/eng/targets/Microsoft.AspNetCore.Components.Testing.targets Fixes task assembly probe path to ../../tasks/... for NuGet layout and emits a warning when E2E apps are declared but the manifest task assembly isn’t found.
src/Components/Gateway/src/build/Microsoft.AspNetCore.Components.Gateway.targets Sets RunCommand/RunArguments as static properties using $(IntermediateOutputPath)-based manifest paths so VS F5/Ctrl+F5 launches via the gateway reliably.

@javiercn javiercn force-pushed the javiercn/preview5-fixes branch from a34835d to f851050 Compare May 26, 2026 17:32
@javiercn
Copy link
Copy Markdown
Member Author

javiercn commented May 26, 2026

/backport to release/11.0-preview5

@github-actions
Copy link
Copy Markdown
Contributor

Started backporting to release/10.0-preview5 (link to workflow run)

@github-actions
Copy link
Copy Markdown
Contributor

@javiercn an error occurred while backporting to release/10.0-preview5. See the workflow output for details.

@javiercn
Copy link
Copy Markdown
Member Author

/backport to release/11.0-preview5

@github-actions
Copy link
Copy Markdown
Contributor

Started backporting to release/11.0-preview5 (link to workflow run)

javiercn and others added 2 commits May 28, 2026 14:40
- Fix #66836: Convert BlazorGateway RunCommand/RunArguments from target-based
  to static properties so VS can read them during F5/Ctrl+F5 launch (matching
  the old DevServer pattern).

- Fix #66617: Update _E2ETasksAssembly path probe in
  Microsoft.AspNetCore.Components.Testing.targets to walk up two directories
  from buildTransitive/net10.0/ to the package root tasks/ folder. Also add a
  build warning when E2E app projects are declared but the task assembly is
  missing.

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

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
@javiercn javiercn force-pushed the javiercn/preview5-fixes branch from a91ae2f to 449a68c Compare May 28, 2026 17:28
@lewing lewing merged commit 00cf101 into main Jun 1, 2026
25 checks passed
@lewing lewing deleted the javiercn/preview5-fixes branch June 1, 2026 18:10
@dotnet-policy-service dotnet-policy-service Bot added this to the 11.0-preview6 milestone Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

4 participants