This article is a mirror article of machine translation, please click here to jump to the original article.

View: 25378|Reply: 0

[Source] ASP.NET Core 3.0 Web modification Razor view does not refresh

[Copy link]
Posted on 11/20/2019 5:02:36 PM | | | |
VS2019 developed ASP.NET Core 3.0 web project, after modifying the view, the modified effect cannot be seen when refreshing the browser.



As shown in the figure above, the URL link of the image is reported as a 404 error, but after changing the image link path correctly, the modified html source code cannot be displayed.

ASP.NET Razor file compilation in Core:The hyperlink login is visible.

1. Install the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation NuGet package.

2. Update the project's Startup.ConfigureServices method to include a call to AddRazorRuntimeCompilation:


In this way, the view can be automatically compiled after the sub-modification.





Previous:The Docker installation runs the Redis cache
Next:PS Jingwei tutorials and various teacher lessons and each version of the software
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com