0
votes

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?

1

1 Answers

0
votes

As it says in the docs

Install the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation NuGet package.