If I write this line of code, services.AddMvc().AddRazorRuntimeCompilation()
, in startup.cs
and while publishing the project from Visual Studio 2019 on Azure, I encounter this error:
The type or namespace name 'RuntimeCompilation' does not exist in the namespace 'Microsoft.AspNetCore.Mvc.Razor'
I've applied ASP.NET Core 3.1.
How can I solve this problem?