ASP.NET Core 3.0: Have to Restart Solution to See Webpage Changes? What?

Love ASP.NET Core 3.0 for web development — but what do you do when you save changes, the go to refresh the running webpage and your changes don’t change? Here’s the answer!

Like most web developers, we make changes to the web pages we’re crafting — hit Save (or CTRL-S) — go back to our browser — hit F5 (or CTRL-F5) — and see what we changed. Rinse. Repeat. Until it’s perfect!

Going from ASP.NET core 2.2 to 3.0 — this stopped working… What??

Have to actually stop the running projects — then restart it. Well that wasn’t going to work — that’s a HUGE time sink.

After some expert googling — found the following and wanted to share as I’m certain I’m not the only one that will want to fix this ASAP.

Need to do two things…

(1) Right click on your project -> Click “Manage NuGet Packages” -> and then “Browse” for the following: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation

(2) In your “Startup.cs” file — you need to add “.AddRazorRuntimeCompilation()”

Now you should be good! Good coding. 🙂

One thought on “ASP.NET Core 3.0: Have to Restart Solution to See Webpage Changes? What?”

  1. I am beginner to ASP.Net. I am obliged for this informative post, I have got many new points and has cleared my doubts. It also helped me understand this topic in more detailed way.

Leave a Reply