升级.net6之后Razor页面出现找不到view的情况,原因是.net6默认移除了一些依赖包,如下完美解决
web工程添加包
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
startup.cs里面加上Compilation引用
builder.Services.AddControllersWithViews().AddRazorRuntimeCompilation();
- The following locations searched Indexthe following locations searched component following the function connection following the listener the complexity following and following follow instruction-following recommendation instruction following empowered overwritten following untracked错误 following provision unable errors