解决方法
首先安装Nuget包:
> Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
然后在Startup里的ConfigureServices中加入如下片段:
public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews() .AddRazorRuntimeCompilation(); }
解决方法
首先安装Nuget包:
> Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
然后在Startup里的ConfigureServices中加入如下片段:
public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews() .AddRazorRuntimeCompilation(); }