Browser Link not working in Visual Studio? We got fixes

Milan Stanojevic
by Milan Stanojevic
Deputy Editor
0 Comments
Download PDF
Affiliate Disclosure

  • If you’re a developer, you’re most likely familiar with Visual Studio.
  • Many Visual Studio users reported that Browser Link is not working for them, but there’s a way to fix this.
  • Don't forget to explore our thorough Software section or more useful guides on this topic.
  • For more fixes and useful guides, we suggest that you visit our Fix Hub.
Fix Browser Link not working in Visual Studio

Visual Studio is one of the most used applications by developers. However, many of them reported that Browser Link isn’t working in Visual Studio for them.

This can be a big problem especially if you’re working on an important project, and in today’s article, we’re going to show you how to fix this problem once and for all.

Ad

What can I do if Browser Link isn’t working in Visual Studio?

1. Configure Visual Studio properly

  1. Add the following NuGet package: AspNetCore.Mvc.Razor.RuntimeCompilation
  2. Now add following line to the ConfigureServices() method in the startup.cs:
    • services.AddRazorPages().AddRazorRuntimeCompilation();
  3. Add this NuGet package: VisualStudio.Web.BrowserLink.
  4. Now locate Startup.cs file and add app.UseBrowserLink(); in the Configure() method.

After doing that, check if the problem is resolved.


2. Remove the default browserlink package

  1. Remove the following browserlink package:
    • VisualStudio.Web.BrowserLink
  2. After doing that, you need to install this package:
    • VisualStudio.Web.BrowserLink.Loader

Few users reported that this solution worked for them, so you might want to try it out.


3. Repair the ASP.NET 5 bundle

  1. Press Windows Key + S and enter control. Select Control Panel from the search results.
    control panel visual studio browser link not working
  2. When Control Panel opens, go to Programs and Features.
    programs and features visual studio browser link not working
  3. Select NET 5 bundle and click the Repair option.
    repair program visual studio browser link not working
  4. Follow the instructions on the screen to repair it.

Once the process is finished, check if the problem is still there. Keep in mind that this solution might only work for older releases.


4. Modify the webconfig

  1. Locate the webconfig file.
  2. Modify it so that it looks like this:

<configuration>

<system.webServer>   

<handlers>

<add name="Browser Link for HTML" path="*.html" verb="*"

Ad

type="System.Web.StaticFileHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

resourceType="File" preCondition="integratedMode" />

</handlers>

</system.webServer>   

</configuration>

Keep in mind that this solution only works if you’re using a static HTML page like with AngularJS.

If Browser Link is not working in Visual Studio for you, be sure to closely follow all solutions from this article.

Keep in mind that our solutions are not universal, and they might not work for your project.

Ad
Was this page helpful?
Thanks for letting us know! You can also help us by leaving a review on MyWOT or Trustpillot.
Get the most from your tech with our daily tips
Tell us why!