在 ASP.Net RCL 项目中启用运行时编译
我创建了一个新的 Razor 类库 (.Net 5) 并将其添加为另一个 ASP.Net Core Web 应用程序中的项目引用。在此 Web 应用程序中,我在 Startup.cs 中添加了 services.AddControllersWithViews().AddRazorRuntimeCompilation()。 现在,Web 应用程序下的任何视图页面更改都会立即反映在浏览器中,而无需重建代码。但它不适用于 RCL 项目中的任何视图。如何在 RCL 中启用运行时编译?
I have created a new Razor Class Library (.Net 5) and added it as a Project reference in another ASP.Net Core Web application . In this Web app, I added services.AddControllersWithViews().AddRazorRuntimeCompilation() in Startup.cs.
Now any view page changes under web application is immediately reflecting in browser without rebuilding the code. But it is not working for any views in RCL project. How can I enable runtime compilation in RCL as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论