Context
In my NET Framework 4.x ASP MVC projects, when using the IDE, it was possible to edit a .cshtml View, then save, then press ctrl+F5 in the browser and see the actual change.
It seems to be not working in .NET Core (using VS 2019 and .NET Core 3 Preview 5)
Question
Is this feature missing in .NET Core or is this a preview issue, or am I missing something?
This is something that is no longer enabled by default as of ASP.NET Core 3, but it can be re-enabled as documented here:
Runtime compilation is enabled using the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
package. To enable runtime compilation, apps must:
I've marked Kirk's answer as accepted, but maybe this experience could be useful also.
My goal was a "quick edit (cshtml/css/js/ts) then see" iteration.
No need to add and mod anything... I discovered that .NET Core (3) and VS 2019 is so much faster, so in case if we do not want to debug in VS (which is the scenario in most cases when we are changing cshtml/css/js/ts) there is really great iteration:
- Press ctrl+f5 to launch your web app (no debug) in browser
- See, test (debug js/ts in Chrome)
- Edit your cshtml/css/js/ts
- Press ctrl+shift+b to build (fast!)
- Switch to your browser and press ctrl+f5 to refresh your page (fast!)
- Goto 2