RickStrahl / Westwind.AspnetCore.LiveReload

ASP.NET Core Live Reload Middleware that monitors file changes in your project and automatically reloads the browser's active page
Other
469 stars 42 forks source link

Web page is not refreshing automatically #21

Closed gang89 closed 4 years ago

gang89 commented 4 years ago

Hi,

Thanks for this awesome library.

I added this library to my .net core 3.0 razor project (running on docker-compose). Have followed the instructions on setting up the live reloading.

One issue I am facing is that I have to manually refresh my webpage in order to see the razor page UI changes - instead of the web browser automatically refreshing upon saving the cshtml file.

Any advise on what might be causing this issue?

Thanks!

RickStrahl commented 4 years ago

You need to make sure you add:

services.AddRazorPages().AddRazorRuntimeCompilation();
services.AddMvc().AddRazorRuntimeCompilation();

along with the runtime compilation packages. See docs...

Without this 3.x projects will not recompile the pages.