core 页面修改后无效
电脑版发表于:2022/2/10 11:15
一:安装依赖包
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation NuGet 包。
Install-Package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation -Version 3.1.0
二:增加AddRazorRuntimeCompilation
public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews().AddRazorRuntimeCompilation(); }