Visual studio not refreshing changes in browser on reload | Code2night.com
Code2night
  • Home
  • Blogs
  • Guest Posts
  • Tutorial
  • Post Blog
  • Register
  • Login
  1. Home
  2. Blogpost

Visual studio not refreshing changes in browser on reload

Date- Jun 09,2021

6523

Net Core Visual Studio

Issue with .Net core 3.1

So, this issue mainly comes while working with .Net core. However solutions can be bit different in earlier versions of .Net core and after version 3.1. So we will see how to fix that for .Net core 3.1. 

First of all, for fixing this issue we have to add a missing NuGet package in our project. For that , navigate to 

Project ->Manage NuGet Packages  

as shown in the image below :-

Now you have to find a package named Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation . You can have a look at the image below.

So, for avoiding compatibility issues we will be using slightly older version for this. As you can see we have used version 3 for this. After selecting that version, click on Install.


Now after your installation is completed . You can move to the last step. You have to add two lines in ConfigureServices Method.You can see in the screenshot below. Add this line to your startup.cs.

IMvcBuilder builder = services.AddRazorPages();
builder.AddRazorRuntimeCompilation();

After adding these lines, now just rebuild your project and run. And this time your changes will be refreshed on browser reload. So this is how we can fix visual studio reload issue in .Net core 3.1.

Comments

Tags

LinkedinLogin
LinkedinProfile
GetLinkedinProfile
C#
Aspnet
MVC
Linkedin
ITextSharp
Export to Pdf
AspNet Core
AspNet
View to Pdf in Aspnet
Model Validation In ASPNET Core MVC 60
Model Validation
Model Validation In ASPNET Core MVC
Model Validation In ASPNET
Image Compression in AspNet
Compress Image in c#
AspNet MVC
Free Download for Youtube Subscribers!

First click on Subscribe Now and then subscribe the channel and come back here.
Then Click on "Verify and Download" button for download link

Subscribe Now | 1210
Download
Support Us....!

Please Subscribe to support us

Thank you for Downloading....!

Please Subscribe to support us

Continue with Downloading
Be a Member
Join Us On Whatsapp Join Us On Facebook

Welcome To Code2night, A common place for sharing your programming knowledge,Blogs and Videos

  • Panipat
  • info@Code2night.com

Links

  • Home
  • Blogs
  • Tutorial
  • Post Blog

Popular Tags

Copyright © 2025 by Code2night. All Rights Reserved

  • Home
  • Blog
  • Login
  • SignUp
  • Contact
  • Terms & Conditions
  • Refund Policy
  • About Us
  • Privacy Policy
  • Json Beautifier
  • Guest Posts