Repository navigation
Conversation
javiercn
requested review from
a team,
lbussell,
mthalman and
tmat
as code owners
September 1, 2026 15:36
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Use the built-in BodyTagHelper component pipeline to append one external browser-tools script for supported net11 MVC and Razor Pages responses. Behavior: changed: supported MVC and Razor Pages activate browser tooling without generic HTML rewriting State: builds; regression coverage follows in the next commit Review hint: the supported boundary is the TagHelper registration and body-only PostContent append; static HTML remains user-activated Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49a13c60-1d66-4321-bfdb-01275ead89d6
Cover body-only script insertion, hosting-startup registration, legacy fallback, and app-model selection for the MVC/Razor Pages boundary. Behavior: preserved State: complete for PR #56072 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49a13c60-1d66-4321-bfdb-01275ead89d6
javiercn
requested review from
a team,
akoeplinger,
lewing,
maraf and
pavelsavara
as code owners
September 2, 2026 10:32
javiercn
force-pushed
the
javiercn-mvc-taghelper-browser-tools
branch
from
September 2, 2026 10:32
6a6eca8 to
e9a9b46
Compare
javiercn
added a commit
that referenced
this pull request
Sep 8, 2026
Cover body-only script insertion, hosting-startup registration, legacy fallback, and app-model selection for the MVC/Razor Pages boundary. Behavior: preserved State: complete for PR #56072 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49a13c60-1d66-4321-bfdb-01275ead89d6
javiercn
added a commit
that referenced
this pull request
Sep 18, 2026
Cover body-only script insertion, hosting-startup registration, legacy fallback, and app-model selection for the MVC/Razor Pages boundary. Behavior: preserved State: complete for PR #56072 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 49a13c60-1d66-4321-bfdb-01275ead89d6
Contributor
|
Due to lack of recent activity, this PR has been labeled as 'Stale'. It will be closed if no further activity occurs within 7 more days. Any new comment will remove the label. |
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.
Important
Stacked on and dependent on #56071. Review this PR against
javiercn-implement-gateway-hot-reload; it contains only the incremental MVC/Razor Pages activation changes.Summary
ITagHelperComponentfrom the existing browser-refresh hosting startup while browser tooling is active<body>content through the built-inBodyTagHelperpipelineindex.html, including restart-only watch modeThe existing hosting-startup and DeltaApplier process-loading paths remain separate. This change does not add YARP to MVC applications and does not implement build-time
index.htmlrewriting.Manual validation
Created a real Razor Pages app with the locally built .NET 11 SDK, then ran:
Observed in a real browser:
/_framework/aspnetcore-browser-refresh.jsscript, as the final<body>element; navigating layouts/pages did not duplicate it.Pages\Index.cshtmlupdated the live heading toTagHelper browser refresh live!; watch loggedC# and Razor changes applied in 1573msand only oneNow listeninglaunch occurred, proving no restart.ASPNETCORE_AUTO_RELOAD_USE_LEGACY_HTML_INJECTION.Then ran the app without tooling:
The page started and rendered with zero browser-refresh script tags and no browser-tools sentinel. The no-launch-profile Production run also reported an unrelated missing generated scoped-CSS development asset; that environment-only static-assets warning did not affect the activation checks. The external NuGet credential-provider workaround was not needed in this fork.
Automated validation
build.cmdRunTests.cs --project test\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj: 115 passedRunTests.cs --project test\dotnet-watch.Tests\dotnet-watch.Tests.csproj --filter "FullyQualifiedName~BrowserRefreshServerTests|FullyQualifiedName~BlazorWebAssemblyAppModelTests": 18 passedBoundaries
MVC and Razor Pages are automatic only when rendering executes the built-in body TagHelper. Static HTML, custom rendering that bypasses it, and hosted Blazor WebAssembly
index.htmlare not covered byITagHelperComponent; hosted Blazor WebAssembly keeps the existing stream fallback to prevent regression. Static/custom applications otherwise require explicit script activation. There is no build-time HTML rewriting in this change.Design deviations: none.