添加nuget包
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation;
Startup.cs 添加services.AddControllersWithViews().AddRazorRuntimeCompilation();