MVC Razor views not refreshing after changes to .CSHTML in .NET Core 3

Since .NET Core 3.0 your views in MVC won’t refresh after you change your .CSHTML markup. According to Microsoft this functionality was removed as a consequence of cleaning up the ASP.NET Core shared framework to not depend on Roslyn.

To have your views refresh in .NET Core 3+ you need to install the below package from NuGet

Install a package

and then enable it from your Startup.cs file.

Add services

Leave a Reply

Your email address will not be published. Required fields are marked *