Disabling Visual Studio’s Browser Link feature for a single project
Posted: (EET/GMT+2)
Browser Link has been part of Visual Studio for quite a while, and in many projects it's a useful feature: it keeps your browser sessions in sync, refreshes pages automatically, and makes front-end development a little smoother. However, there are times when you simply don't want it to be active. For example, local debugging might slow down, or you may be testing something that should run without Browser Link intercepting requests.
Fortunately, you can disable Browser Link on a per project basis in your ASP.NET or ASP.NET Core application.
In an ASP.NET Core project, Browser Link is enabled through the usual development-time middleware registration block:
if (env.IsDevelopment())
{
app.UseBrowserLink();
}
To disable Browser Link, simply remove (or comment out) the UseBrowserLink() call for that specific project. Your application will run normally without
attempting to connect to Browser Link endpoints.
If you're working with older, classic ASP.NET applications, you can also disable Browser Link from the project settings in Visual Studio:
- Select the project
- Open the "Properties" window
- Set "Browser Link Enabled" to False.
This changes the underlying .csproj flag:
<Project>
<PropertyGroup>
<BrowserLinkEnabled>false</BrowserLinkEnabled>
</PropertyGroup>
</Project>
This way, you can keep Browser Link where it helps you, and switch it off cleanly where you'd rather avoid it. It's a small adjustment, but useful to know when working with multiple web projects in the same solution.