title: How to disable Browser Link in ASP.NET Core (.NET 6, VS 2022)
body: <p>I have disabled Browser Link inside Visual Studio 2022, and I have also disabled all the Hot Reload functionality.</p>
  <p><a href="https://i.stack.imgur.com/0KgN3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0KgN3.png" alt="Enable Browser Link is unchecked" /></a></p>
  <p><a href="https://i.stack.imgur.com/SmZuJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SmZuJ.png" alt="Hot Reload settings are disabled" /></a></p>
  <p>Even the Browser Link Dashboard indicates it should be disabled:</p>
  <p><a href="https://i.stack.imgur.com/8qxYg.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8qxYg.png" alt="Browser Link Dashboard" /></a></p>
  <p>I also <strong>do not use</strong> any of the <code>app.UseBrowserLink();</code> code anywhere in my code. (as documented in <a href="https://docs.microsoft.com/en-us/aspnet/core/client-side/using-browserlink?view=aspnetcore-6.0" rel="noreferrer">Browser Link in ASP.NET Core</a>.</p>
  <p>However, these middlewares still somehow appear in the request pipeline:</p>
  <ul>
  <li><code>Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware</code></li>
  <li><code>Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware</code></li>
  </ul>
  <p>These middlewares add this to my HTML:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;!-- Visual Studio Browser Link --&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;https://localhost:44399/0928d478a97d441187231f2a1a7cd5e5/browserLink&quot; async=&quot;async&quot; id=&quot;__browserLink_initializationData&quot; data-requestId=&quot;c94cf93088fb44e98f4e499b20ad7bfe&quot; data-requestMappingFromServer=&quot;False&quot;&gt;&lt;/script&gt;
  &lt;!-- End Browser Link --&gt;
  
  &lt;script src=&quot;/_framework/aspnetcore-browser-refresh.js&quot;&gt;&lt;/script&gt;&lt;/body&gt;
  </code></pre>
  <p>And every time I save a file, it reloads the browser. I want to stop this behaviour, and I ran out of options how.</p>
  <p>Is this something that the IIS Express or Visual Studio add automatically?</p>
  <p>I also checked all the packages and DLLs, and I don't see it included anywhere in my code. It must be included automatically via some &quot;magic&quot; that Visual Studio 2022 does.</p>
  <p><strong>How do I stop all this reloading? I do not want any Browser Link or Browser Refresh. Please help, I spent a lot of time on this, and I'm desperate.</strong></p>