Fix issues with Blazor WASM delta applier #43152
Merged
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.
BlazorWebAssemblyDeltaApplier.WaitForProcessRunningAsync
needs to wait until the build is complete and the app is running to avoid treating file changes that occur during build as Hot Reload changes. We can use browser connection event as an indication that Blazor WASM app is running. Alternatively, we could notify dotnet-watch via named pipe from a module injected to the host (blazor-devserver.dll
) but that's more complex and adds more dependencies on the details of the host to dotnet-watch.Enables unit testing apps that require browser connector (such as Blazor WASM). We mock the browser by short-circuiting code paths that launch the browser or apply the change in the browser if a
TestFlags.MockBrowser
is specified.Adds Blazor WASM test. The test validates that Blazor WASM app builds and starts correctly under
dotnet-watch
. Testing update in Razor file is blocked by dotnet/razor#10818.Contributes to https://github.com/dotnet/AspNetCore-ManualTests/issues/3080.