Repository navigation
Conversation
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Multiple older-framework WebAssembly clients export conflicting root-scoped fallback assets, causing their host’s Debug build to fail.
1 open issue
What changed in this PR
Adds a build-only disabled Hot Reload settings fallback for pre-.NET 11 applications, avoiding missing-endpoint responses during ordinary launches.
Changes:
- Generates a constant fallback using existing Hot Reload gates, excluding publish output.
- Adds integration coverage for generation, cleanup, publishing, and hosted WebAssembly.
- Updates architecture and contributor guidance.
| File | Description |
|---|---|
| test/Microsoft.NET.Sdk.StaticWebAssets.Tests/HotReloadBrowserToolsIntegrationTest.cs | Adds fallback lifecycle and configuration tests. |
| src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.HotReload.targets | Generates and registers the fallback asset. |
| src/StaticWebAssetsSdk/AGENTS.md | Documents fallback generation and ownership. |
| src/Dotnet.Watch/AGENTS.md | Clarifies provider precedence over the fallback. |
| .github/memory/ARCHITECTURE.md | Updates the settings endpoint architecture. |
Review effort: Balanced
| SourceId="$(PackageId)" | ||
| SourceType="Computed" | ||
| ContentRoot="$(_HotReloadBrowserToolsIntermediatePath)" | ||
| BasePath="/" |
This branch has not been deployed
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.

Possible fix for dotnet/aspnetcore#69718.
Problem
After #56118, .NET 11 SDK generates Blazor browser-tools initializers when Hot Reload build outputs are enabled (by default in Debug builds). This also happens for ordinary
dotnet runlaunches and projects targeting older frameworks, since SDK selection is independent of the target framework.When an initializer probes
/_framework/dotnet-browser-tools/hot-reload-settings.json, older hosts lack the disabled-settings endpoint supplied by .NET 11 ASP.NET Core hosts. The initializer correctly treats the failed request as Hot Reload being disabled, but the browser still reports a 404.Change
For pre-.NET 11 targets, generate a constant
{"hotReload": false}static asset at the existing settings URL. Generation uses the existing browser-tools gate, includingEnableHotReloadInRuntimeConfigDevFile. The asset is build-only, excluded from publish output, and reused without rewriting on incremental builds.Net11+ targets continue using their existing host fallback. Their non-Development behavior is unchanged.
Behavior preservation
-1000, ahead of static asset endpoints at-100.false. The provider suppliestruedynamically, preserving the same build output across ordinary and watch launches.Validation
All Web/WASM regression cases covering net8 and net10 fail without the fix and pass with it. All 32 focused integration tests and 12 real-browser run/watch scenarios pass, including state-preserving live edits.