4

I'm developing on my localhost a new Blazor server-hosted app. I launch the template that it starts you out on... looks very nice. I change the text in the tag, refresh my browser... and no change. I refresh and refresh only to notice no change. Is something wrong?

Then I rebuild and rerun the app again and the change happened. Why do I have to restart the entire server for a small front-end change? I have to do this on every change I make? Even though the changes are for the front-end? If so, then the development experience for MVC apps is way better. I don't have to restart my server for changing the code for the front end.

I know dotnet watch exists, but it doesn't help. It still restarts the server for every change I make for the front-end. I have to wait like 10 seconds for just changing some CSS? Please tell me if I'm doing something wrong, or if this is by design.

Also, I tried the web-assembly version of Blazor. Same results.

AskYous
  • 3,740
  • 5
  • 40
  • 69
  • Does this answer your question? [Is there any hot reload for blazor server-side?](https://stackoverflow.com/questions/58172922/is-there-any-hot-reload-for-blazor-server-side) – Jason Aug 26 '21 at 16:07

2 Answers2

0

I guess you are running the app with the debugger connected? this prevents the recompilation. You need to:

Press Ctrl-F5 to run the app without the debugger.

This should work on Windows using IIS, but on Mac "it's a bit more complex". According to a MSFT representative, they are planning on enabling this functionality for Mac users, but this info is already over a year old (from April 2020).

Jason
  • 1,719
  • 1
  • 12
  • 25
0

This issue still happens, and for me is a major downside. It doesn't make any sense to have to recompile entire project just because I changed some text on a page. If this is a design choice, it's doomed! Can't have a designer dependent on developers to recompile whenever a small change is required on simple html! Even if you change an element style you have to recompile!

Hugo A.
  • 123
  • 10