美文网首页
.Net Core 5 运行过程中,增加的html代码,刷新页面

.Net Core 5 运行过程中,增加的html代码,刷新页面

作者: 飞天猪Pony | 来源:发表于2021-06-01 14:30 被阅读0次

Nuget 引入:Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Startup.cs文件

  public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllersWithViews();
            services.AddSession();

            //1.Nuget安装:Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
            //2.配置
            services.AddRazorPages().AddRazorRuntimeCompilation();
        }

相关文章

网友评论

      本文标题:.Net Core 5 运行过程中,增加的html代码,刷新页面

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