VS2019中缺少Browserlink,browserlink正常从哪里获取/加载?

Missing Browserlink in VS2019, Where is browserlink acquired / loaded from normally?

我本地安装的 VS2019 (16) 似乎缺少对 BrowserLink 的引用。我试过修复安装,安装多个不同的 SDK 都无济于事。

BrowserLink 通常位于何处?以及导致它在开发版本中加载的机制是什么? 从版本 12 开始,它似乎没有从 VS 中单独打包,除非您使用新的 .net 核心版本。

我们检查了 GAC、NuGET,运行 没有选择。

这是一个 .net 4.5 项目,如果相关的话。

Could not locate assembly Microsoft.WebTools.BrowserLink.Runtime, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a in the Assembly Stores configured.  Requesting assembly:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Could not locate assembly Microsoft.WebTools.BrowserLink.Runtime, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a in the Assembly Stores configured.  Requesting assembly:

根本原因几乎可以肯定与此项目具有共享的非标准程序集缓存的愚蠢方式有关,并且不会回退到正常的开发位置,但问题是正常的 location/mechanism 用于加载 BrowserLink (16)。

如果你的VS2019已经安装在默认选项中,你可以在这个路径下找到浏览器Link库文件:

C:\Program Files (x86)\Microsoft Visual Studio19\Professional\Common7\IDE\Extensions\Microsoft\Web Tools\Browser Link

(根据自己的安装位置替换路径)

然后您可以决定是将 Microsoft.WebTools.BrowserLink.*.dll 复制到您的应用程序的程序集缓存中,还是将此路径包含在您的应用程序中。