Razor.RuntimeCompilation creates an error

33 Views Asked by At

Error image

I added the AspNetCore.Mvc.Razor.RuntimeCompilation package for live updating of .cshtml pages.

But when writing

builder.Services.AddControllersWithViews().AddRazorRuntimeCompilation(); 

an error occurs in the Program.cs file:

An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately. When compiled with the usual builder.Services.AddControllersWithViews(), everything works correctly.

The package version is correct and no other errors occur. Please tell me what could be the problem?

0

There are 0 best solutions below