Edit and continue not working for asp.net core 3.0?

半腔热情 提交于 2020-01-04 02:57:30

问题


We are about start a new project, and doing a POC to start working with asp.net core 3.0.

a) Looks like edit and continue for the asp.net core 3.0 not working. is asp.net core 3.0 doesn’t support edit and continue?

b) Also, Even static cshtml page update also not reflecting until we stop debug and re-try.

VS Version: Microsoft Visual Studio Professional 2019 Version 16.3.1


回答1:


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();
}

For this issue, you could trace by Breaking changes to runtime compilation for Razor views and Razor Pages #343



来源:https://stackoverflow.com/questions/58173846/edit-and-continue-not-working-for-asp-net-core-3-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!