I’ve been using dotnet watch run
for years to perform hot reloads with my Blazor Server application, and it’s been working correctly to hot reload and apply my code changes to my application. I’ve done that successfully using .NET 5, .NET 6, and .NET 8 in this same application.
A couple days ago I was trying to update Visual Studio from the version I was on (17.10.something I think) to 17.12.3. After the update was applied, Visual Studio wouldn’t start — I forget the error it was giving me – and I had to do a Repair. The repair put me on 17.12.3 and restored all the default settings.
Ever since then, dotnet watch run
doesn’t perform hot reload correctly. I make simple changes in my code for which hot reload worked previously — such as updating the text in a Blazor component or changing the text in a Console.WriteLine
— but that change doesn’t appear on the site.
It seems like dotnet watch
is detecting the file that I changed, but then it doesn’t load the new version. For instance, when I make an edit to EditOrder.razor
, this is the output I get from dotnet watch run
dotnet watch ⌚ File deleted: .\Pages\Orders\EditOrder.razor
dotnet watch ⌚ No hot reload changes to apply.\
Checking a few of the other posted solutions:
- My configuration is set to Debug.
- Hot Reload is enabled