I\'m building a .NET Core MVC on the latest version 2.2. I have a problem when I make changes to the CSHTML file and refresh the page, my changes are not reflected in the br
I've just created a new project using the latest ASP.NET MVC Core 3.1 template and I altered the following to get runtime recompilation enabled for Debug:
Reference NuGet package - Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.
Startup.cs - ConfigureServices(IServiceCollection services) WAS:
// stuff...
services.AddControllersWithViews();
// more stuff...
NOW:
// stuff...
var mvcBuilder = services.AddControllersWithViews();
#if DEBUG
    mvcBuilder.AddRazorRuntimeCompilation();
#endif
// more stuff...