Fix BlazorGateway VS F5 launch (#66836) and E2E manifest task path (#66617)#66849
Merged
Conversation
Contributor
There was a problem hiding this comment.
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/RunArgumentsas evaluation-time properties so VS can see them without runningComputeRunArguments. - Fixes
GenerateE2EManifesttask 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. |
a34835d to
f851050
Compare
Member
Author
|
/backport to release/11.0-preview5 |
Contributor
|
Started backporting to |
Contributor
|
@javiercn an error occurred while backporting to |
Member
Author
|
/backport to release/11.0-preview5 |
Contributor
|
Started backporting to |
f851050 to
886e9e9
Compare
10 tasks
Open
3 tasks
886e9e9 to
67538d1
Compare
8d5ab32 to
a91ae2f
Compare
- 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>
a91ae2f to
449a68c
Compare
lewing
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/RunArgumentsinside 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 #66617 —
GenerateE2EManifestsilently skipped (no manifest produced)Root cause: The
_E2ETasksAssemblypath probe inMicrosoft.AspNetCore.Components.Testing.targetsuses$(MSBuildThisFileDirectory)tasks\...but in the NuGet package layout,MSBuildThisFileDirectoryresolves tobuildTransitive/net10.0/— two levels below the package roottasks/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
RunCommand/RunArgumentsas static properties