I have a .NET Core 5 MVC web application, using IIS Express to run locally during development. I'm using VS Community 2019 v16.11. The hot reload function does not work when I apply basic changes to cshtml views etc. Any ideas?
1 Answer
I had similar problem with Hot Reload in VS, I found out that it was caused by trying to Debug the application and also doing hot reloading at the same time. Hot reload did not work at all for blazor apps specifically (in my case) that I found from microsoft documentation : https://learn.microsoft.com/en-us/aspnet/core/test/hot-reload?view=aspnetcore-6.0.
So for me solution was that I started application without debug mode then After hot reload started working.
3 Comments
Manektech Knowledge Base
yes hot reload introduce in .NET 6 with visual studio 2022 so if your are running .net6 with visual studio 2022 then only you can use hot reload
Andy
This is so weird. This worked for me too. I don't even care about hot reloading. I am ok to save the view and refresh the browser manually like I used to do in .Net Framework 4.8 MVC. I just want to be able to put breakpoints in as well. So basically I have to start without debugging when working on theming and start with debugging when debugging...a step backwards in my opinion. Its just I see no need to faff around learning NextJS when MVC can already return "server side rendered" content. So I use CRA for the login/secure areas and MVC for the parts that I want Google to crawl.