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
and then enable it from your Startup.cs file.