question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.NET 8 Preview 4 - Blazor WASM - Hot Reload broken with dotnet watch

See original GitHub issue

Describe the bug

  • Static Blazor WASM client.
  • .NET 8 preview 4

Hot Reload isn’t usable anymore.

After every (saved) change in a .razor page the dotnet watch cli reports the following error:

dotnet watch ⌚ File changed: .\Pages\Txt2Img.razor.
dotnet watch ⌚ C:\X\Repos\Tusk\ClientTusk\Program.cs(10,28): error CS0246: The type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?)
dotnet watch ⌚ Found compilation errors during hot reload. Reporting it in application UI.

If you do CTRL-R (restart) everything works again. Without an additional change.

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Reactions:9
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

5reactions
hukarcommented, Jun 9, 2023

I am getting the same issue with a blazor WASM app, however not running .NET 8 previews. I am using .NET 7

dotnet --version
7.0.203

I have the same issue with 7.0.302, It’s a very frustrating problem when using Blazor Wasm professionally and every day!

4reactions
MarkusRodlercommented, May 19, 2023

I can confirm the exact same bug

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hot reload blazor via dotnet watch not working
I know that with debugging it's currently not possible, so without, it's hosted asp.net core but even standalone it's not working. I am...
Read more >
Hot Reload not so hot. : r/Blazor
Net 8 preview and it works for me when debugging, I do have to push ... Pages/Index.razor.dotnet watch ⌚ No hot reload changes...
Read more >
Weird errors problem with dotnet watch with blazor/wasm.
I have a really annoying problem with dotnet watch and blazor/wasm. I have a solution in which I have multplie projects, for example...
Read more >
Support .NET6 Hot Reload for Blazor Server ... - YouTrack
Regarding Blazor WASM Hot-Reload without debugging (like it works when you run it under dotnet watch in the terminal) - no updates currently,...
Read more >
Hot Reload Leads ASP.NET Core Updates in .NET 6 ...
For ASP.NET Core, the main Hot Reload improvement affects dotnet watch , a ... dotnet watch can now detect them in Blazor WebAssembly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found