Reputation: 625
We just upgraded all but one of our web app projects from .NET Core 3.1 projects to .NET 6 in our solution. These were ASP.NET Core 3.1 projects using Razor. Here are the results we're seeing with respect to Hot Reload:
When we run these projects in VS 2019, we can refresh the pages in any of our projects and we will see the updates. Are there some settings that we're missing here?
Upvotes: 20
Views: 24457
Reputation: 41
In my project, I deselect 'Enable native code debugging' then Hot reload working: Project > Properties > Debug > General > Open debug launch profiles UI > IIS Express.
Upvotes: 0
Reputation: 1340
I had the same issue and the following steps fixed it.
bin
and obj
folders in your solution..vs
(hidden) folder in the solution root.And this is my (default) Hot Reload settings:
Hope this might help someone.
Upvotes: 4
Reputation: 1387
Apart from all the other good suggestions, my case was different.
I had the same issue. There were 2 projects running, and the first one was the API. After starting the API project separately (right-click on the Project name, Debug>Start..) the only project I actually ran was my Blazor WASM. Then the Hot Reload started to work for the Blazor WASM project.
Hope it helps, if anyone has a similar issue.
Upvotes: 1
Reputation: 63
I had the same issue and after trying everything including rolling back the version and adding .AddRazorRuntimeCompilation()
to Program.cs
still didn't work. What I did was literally re-check the "Hot reload on file save" option when you click on the down arrow to bring up the menu on the hot reload button from the menu bar. That did the trick for me.
Hopefully this works for you.
Upvotes: 1
Reputation: 625
Big Thank you to Guru Stron! His comment in my question directed me to where I should've looked. We had to:
This answer solved our issue - .NET Core MVC Page Not Refreshing After Changes
Upvotes: 21
Reputation: 9943
First, Make sure all options are selected
In Hot reload, You can select Hot Reload On File Save
(Not selected by default), Then VS will hot reload after you ctrl+s
;
Demo
Upvotes: 17