current position:Home>asp. Net core method for modifying HTML without rerun

asp. Net core method for modifying HTML without rerun

2022-05-15 02:06:30thankseveryday

Method 1 ( recommend )

install :https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation/

command :

dotnet add package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation --version 3.1.0

And then modify Startup

public void ConfigureServices(IServiceCollection services)
        {
    
            services.AddControllersWithViews().AddRazorRuntimeCompilation();
        }

Method 2

dotnet watch run
Auto reload

copyright notice
author[thankseveryday],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/132/202205120527258291.html

Random recommended