Hot Reload not working for Blazor WebAssembly

Hot Reload iw not working for a vanilla out-of-the-box Blazor WebAssembly app.

I submitted Ticket Request #6611534 about this on July 16 and followed up a few days ago but with no response. Posting ticket content here to see if the community can be helpful.

Here are the steps I took:

Created a project with the following settings

Ran the website.

My Machine:

I included logs in the support ticket.

0
3 comments

Hello Saif,

Thank you for contacting Rider support. Apologies for taking so long to respond. I found your previous ticket and merged it to the current one to avoid duplication. I see my colleague suggested trying `dotnet watch`. Please do so (there is an instruction below in this message).

I'll proceed with your support request now. The scenario you described indeed looks weird and hot reload should work

First, I suggest the following steps:

  • Update Rider to 2024.1.5;
  • Open your project in Rider;
  • Ensure all the Hot Reload settings are enabled in Settings | Build, Execution, Deployment | Hot Reload;
  • Invalidate caches via File | Invalidate Caches;

If none of that helped, please try running your project via dotnet watch. Open the terminal (you can do it right in the Rider terminal) and cd {YourSolution}/{BlazorProject}. Then invoke dotnet watch. Your project should start and the browser should open. Edit the Home.razor file from Rider and invoke save (Ctrl/Cmd+S or File | Save All). Then switch to browser and check if changes reflect;

Please let me know the outcome

If with dotnet watch, the hot reload works, but the issue still persists in Rider, would you mind sharing another log bundle as described below?

  • Go to Help | Diagnostic tools | Choose Trace Scenarios;
  • Enable the trace scenario for Roslyn;
  • (Optionally) Share a screencast that demonstrates the issue;
  • Reproduce the issue;
  • Collect the full log bundle via Help | Collect Logs and Diagnostic Data;
  • Disable the trace scenarios enabled;
  • Upload it to our server and share the upload ID.

Hope to hear from you soon. Have a great day!

0
Hello Saif,

Got it, thank you. If the issue persists, then we need logs with Roslyn traces to troubleshoot the issue. Would you mind collecting and sharing them as I described earlier?

Have a nice day!
0

Thank you!

I noticed a problem with the Safari browser. For me the hot reload doesn't work when the Safari browser is used. For me the hot reload doesn't work with Safari browser: neither via dotnet watch nor from Rider (In case I configured Safari to be used as a browser)

Would you mind confirming the following points?

  • Do you use Safari as your default web browser in system settings? (Apple Preferences | Desktop & Dock | Default web browser)
  • Is Safari configured to be used in Rider: Settings | Tools | Web Browsers and Preview. In other words, is it Safari opens when you Run from Rider?
  • What browser opens when you run dotnet watch? Is it non-Safari, chromium-based one by chance?
  • Try setting Chrome or another chromium-based browser in Rider settings and verify if the issue persists.

Have a nice day!

0

Please sign in to leave a comment.