The first times I used Blazor WASM, I found it annoying that I wasn’t able to make changes to the HTML while debugging and immediately see the result in the browser.
As a developer mainly working with XAML in frontends, I got so used to things like Hot Reload that allow me to change my XAML while debugging and directly see the changes on the screen. The improves the feedback loop drastically and lets me quickly iterate when finetuning and debugging my UI. Lots of (JS) UI frameworks support something similar as well.
Luckily, it is possible to achieve something similar while working with Blazor WASM. The trick is to NOT start debugging your project from Visual Studio, but rather from the command line.
If you use the following parameters, your application will automatically reload when you make changes to your files:
dotnet watch run
Have fun while working with Blazor!
February 1, 2022 at 2:42 pm
does not work for me, I do see the checkmark icon appear on the top left corner but the changes in .razor files aren’t reloaded… in VS I only have the backend running.