Blazor WebAssembly Hot Reload does not work if body tag is incorrect #38454
Labels
area-commandlinetools
Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI
bug
This issue describes a behavior which is not expected - a bug.
feature-dotnetwatch
This issue is related to the dotnet-watch command-line tool (now external)
feature-hot-reload
This issue is related to the Hot Reload feaature
Milestone
Blazor WebAssembly Hot Reload does not work when the HTML body tag is not correct. This may not be a bug, but it threw no errors and was frustrating to debug.
This occurred when I was upgrading a project from .NET 5 to .NET 6.
When a change was made, the hot reload would detect that a file was changed.
watch : File changed: C:\Users\trevo\...etc
However, it would be stuck at never apply the updates to the UI.
My body tag in my index.html was configured incorrectly. It had an extra space at the end of the body tag.
</body >
Should have been:
</body>
This is more hopefully just an FYI as opposed to something that perhaps a direct bug.
To Reproduce
Further technical details
Fixes/Workarounds
Make sure the tags don't have any extra space in them so that the Hot Reload Deltas can be correctly applied.
The text was updated successfully, but these errors were encountered: