美文网首页
.NET Core 3.0 Web项目,修改视图后,刷新浏览器看

.NET Core 3.0 Web项目,修改视图后,刷新浏览器看

作者: Munan_ | 来源:发表于2020-07-06 22:49 被阅读0次

VisualStudio2019下一个2.2另一个3.0页面修改如下,但是3.0刷新没有任何变化,难道VS以后不能做前端开发了?大家可能没有看官方文档

image

根据文章所说你需要:

1.安装 Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation NuGet 包。

<pre style="margin: 0px; padding: 0px; overflow-wrap: break-word; font-family: "Courier New" !important; font-size: 12px !important;">Install-Package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation -Version 3.0.0</pre>

2.将项目的 Startup.ConfigureServices 方法更新为包含对 AddRazorRuntimeCompilation 的调用:

<pre style="margin: 0px; padding: 0px; overflow-wrap: break-word; font-family: "Courier New" !important; font-size: 12px !important;">services
.AddControllersWithViews()
.AddRazorRuntimeCompilation();</pre>

image

相关文章

网友评论

      本文标题:.NET Core 3.0 Web项目,修改视图后,刷新浏览器看

      本文链接:https://www.haomeiwen.com/subject/tnjnqktx.html