自ASP.Net Core 3.0版和更高版本开始:
Since ASP.Net Core version 3.0 and higher:
A)运行应用程序时编辑Razor View(.cshtml)文件在重新启动之前不会应用更改.
A) Editing a Razor View (.cshtml) file while running the application does not apply the changes until restart.
B)似乎编辑和继续操作不起作用.
B) Looks like edit and continue is not working.
IDE和版本: Microsoft Visual Studio 2019
IDE and Version: Microsoft Visual Studio 2019
推荐答案对于此问题,建议您尝试安装软件包Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation,然后像在
For this issue, I suggest you try to install package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation and then configure AddRazorRuntimeCompilation in Startup.cs like
public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews().AddRazorRuntimeCompilation(); }对于此问题,您可以通过对Razor视图和Razor页面的运行时编译进行重大更改,以进行跟踪. 343
For this issue, you could trace by Breaking changes to runtime compilation for Razor views and Razor Pages #343
更多推荐
AspNet Core 3.0和3.1:启用Razor页面的运行时编译
发布评论