-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.cshtml change does not show on page refresh in ASP.NET Core 3 #8856
Comments
This support articel https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-3.0 says that you have to install an extra package and activate the recompilation of views in 3.0. |
That did the trick but why would this be removed from the default setup of a project? This seems like one of the very basic requirement? or am i missing something? |
Thanks for contacting us, @bhrugen90. |
I followed the instructions linked here, but when I make changes to razor code in the view, I get a warning (purple squiggle under the code changes)
Is this a symptom of this bug, or is there something else that needs to be done for runtime Razor code compilation? Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation - 3.0.0-preview7.19365.7 |
services.AddMvc().AddRazorRuntimeCompilation(); that what worked for me. |
@Kolichikov there were bugs in VS 16.3, which in some cases would cause that behavior. Those should be fixed in VS 16.4 release. |
Razor file compilation in ASP.NET Core | Microsoft Docs |
Thank you so much for this @tomexou! After 2 hours of searching around forums and trying a number of "cache-busting" techniques, this is the only answer that I found worked! |
Describe the bug
This is working in ASP.NET Core 2.2, in VS2019.
When you run a project and while project is running, you make a change in view(.cshtml) and go back and refresh the page (while application is running) it used to show the change made.
But is ASP.NET Core 3 I have to run the project again to see changes made in view. To reproduce, if you open a new project and run the project and go to view and make a change and save it. Go back to webpage and refresh it will not be displayed.
This is blocking the development big time. Is there some custom configuration needed with asp.net core 3 or or this a known issue?
The text was updated successfully, but these errors were encountered: