aspnetcore: Hotreload doesn't work on Blazor wasm (.NET6)
Hotreload doesn’t work on blazor wasm (.NET6 LTS)
I’ve created a brand new blazor wasm project using Visual Studio 2022 (Version 17.1.0 Preview 1.1) and couldn’t get hotreload to work, HOWEVER it works perfectly fine on blazor server!
To Reproduce
Windows 11 Brand new .NET6 blazor wasm project and then run “dotnet watch” as soon as something is changed it’s gonna end up with this particular message and should be restarted manually!
watch : File changed: C:\Users\alikh\source\repos\BlazorApp1\BlazorApp1\Pages\Index.razor.
watch : No hot reload changes to apply.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 15 (5 by maintainers)
This is happening to me also. Creating a new ASP.NET Core Hosted Web Assembly app and running
dotnet watchfrom theServerdirectory.Umm I’m going to raise a flag here because for me it extends to the hosting environment also (meaning no clients receive updates after changes are published) and I think it’s related. Please see my comment on this same topic in another issue thread https://github.com/dotnet/aspnetcore/issues/38809#issuecomment-985967854
However it won’t be working using that certain trick for blazorwasm hosted with asp.net core 😦
Did anyone find a solution? I moved to .NET 7 November release , it is still happening.
dotnet watchordotnet watch runthey work well when first editing a file, after that:This seems not to be fixed in SDK 6.0.200–when I do
dotnet watch --project .from the Server directory, wait for it to spin up and load the page, then change the text on the page, I still get:With --verbose, I get:
There are hot reload changes to apply. Come on, it is so close to working! Can anyone help?
It’s so bizarre actually, I just realized it works using this command “Dotnet watch --project .” is it something particularly different in that way? I couldn’t find it in official documentation, I just bumped into that one in some forums…