Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sample app not updating after code change and browser refresh? Build hangs Blazor

Tags:

blazor

Real excited to learn about Blazor. Lots of potential here with this framework!

VS 2017 build 15.8.9 and VS extension for Blazor v 15.5.9 Ok, so I'm going through the demo app (todo) after starting a new project using the asp.net core (hosted) template.

The first problem I'm running into is code changes not being reflected in the browser (edge, Firefox and Chrome). However, if I stop the app (via visual studio) and try to start again, a build starts but just seems to go on and on.
If I stop the site via iis express in the system tray, stop the build, then re-launch, it builds fine and runs with the expected results of the code change reflected in the browser.

What can I check?

Does the same thing when dropping down to command line and using dotnet run from the blazor_do.server folder

like image 978
bitshift Avatar asked Nov 26 '25 08:11

bitshift


1 Answers

dotnet run will not work, you need to use dotnet watch run

See also: https://github.com/aspnet/Blazor/issues/1428

And this: https://github.com/aspnet/Blazor/issues/1704

For more tips on getting it to work

EDIT: Also make sure your are running the correct versions from: https://blazor.net/docs/get-started.html

Most important:

  • .NET Core 2.1 SDK (2.1.500 or later).
  • Visual Studio 2017 (15.9 or later)
like image 164
Flores Avatar answered Nov 27 '25 21:11

Flores