.Net Core 5 运行过程中,增加的html代码,刷新页面没有生效解决方法

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代码,刷新页面没有生效解决方法)