15

In the Microsoft Virtual Academy course 'Introduction to ASP.NET Core (formerly ASP.NET 5)', video 3, at 39:00, they demonstrate how Browser Link can sync code selection between Edge's F12 tools and Visual Studio. I haven't been able to see the same functionality out of the box. I don't know if there's a setting, or something special to enable this. If there is, it wasn't shown in the course video, but then again the video is a couple months old. I've never seen this functionality before.

Browser Link is connected to Visual Studio from Edge, as can be seen in the Browser Link Dashboard in VS. That's all fine.

There is a console log in Edge that seems relevant;

Browser Link: Failed to invoke return value callback:
TypeError: Unable to get property 'files' of undefined or null reference.
browserLink (64,492)

I found the only function in the BrowserLink js that references 'files' and started going up the stack trace. It seems to expect a JSON from localhost:9640/5b39911a4f384282a7625405b2d603cf/browserLinkSignalR with multiple elements, [1] being a list of source files, but is actually null, so catches and posts that console log.

Nothing useful on Google, or their GitHub issues. If there was a relevant Github repo I could be pointed to, I could look it up.

  • Microsoft Visual Studio Enterprise 2015 Version 14.0.25421.03 Update 3
  • Microsoft .NET Core Tools (Preview 2) 14.1.20624.0
  • "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0"
  • Edge 25.10586.0.0
JPain
  • 305
  • 1
  • 9

2 Answers2

0

Whenever i'm doing something new like this, i would try to find an example project that is leveraging the same feature somewhere on github. I would then build that project and see if it works. If the example project works and yours does not. I would then begin checking using statements, project configuration properties (right click project in solution explorer/properties), web config settings, includes, references and all included library versions. You should be able to figure this out by following those steps. I would be willing to bet that it is something nominal like a missing app or web config setting. Things of that nature can be difficult to detect without a working example project or proper instructions.

See this microsoft.com tutorial, although its not for the same version of visual studio, it may have some information that can lead you in the right direction. Microsft.com Browser Link tutorial

0

I fixed this issue by removing the default browserlink package

Microsoft.VisualStudio.Web.BrowserLink

and installing

Microsoft.VisualStudio.Web.BrowserLink.Loader

Here is an updated guide from Microsoft docs

I was also getting other errors in the console about missing css with browserlink and this fixed that too.

Robert
  • 827
  • 9
  • 16