Installed Web Essentials in my new computer but I cannot get Browser Link working with ASP.NET 5 / MVC6 web Applications projects. Works Fine with ASP.NET 4.5 however. This is what I have tried so far.
My project.json has following dependencies already when I create the project
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final"
My Startup.cs class also already has configured BrowserLink (I am running in DEV env)
if (env.IsDevelopment()) { app.UseBrowserLink(); app.UseDeveloperExceptionPage(); }
I have enabled Browser Link form toolbar
Non worked.. When I run the app pressing F5, the browser link dashboard doesn't detect any browser. says 0 connections.
I have also tried uninstalling Web Essentials and reinstalling. Also tried using Web Essential Nightly build.
Re-intalling Visual Studio did not helped either.
Anything else that I might be missing? I am using VS2015 community on Windows 10 machine. I have another computer with similar setup works fine in that computer. I tried creating project in My other computer where browser link was working and copied the project to this computer, That did not help either.
Browser Link uses SignalR to create a communication channel between Visual Studio and the browser. When Browser Link is enabled, Visual Studio acts as a SignalR server that multiple clients (browsers) can connect to. Browser Link also registers a middleware component in the ASP.NET Core request pipeline.
Browser Link is a new feature in Visual Studio 2013 that creates a communication channel between the development environment and one or more web browsers. You can use Browser Link to refresh your web application in several browsers at once, which is useful for cross-browser testing.
ASP.NET 4.5 adds support for performing flushes asynchronously using the BeginFlush and EndFlush methods of the HttpResponse class. Using these methods, you can create asynchronous modules and asynchronous handlers that incrementally send data to a client without tying up operating-system threads.
Oh, I just remembered. It could be related to known issue #3 here: https://github.com/aspnet/Tooling/blob/master/known-issues.md
EDIT: The link above is broken now because it referred to a setup bug in a prerelease version of the ASP.NET 5 tools, which is obsolete and no longer available. If you are using ASP.NET Core with VS 2015 and Browser Link doesn't work, it's not because of this issue.
However, if you have the old release and you are hitting this issue, the fix was to find the ASP.NET 5 bundle in Add/Remove Programs, and "Repair" it.
This may not work for you but others seeking this solution. If you are running static html pages, such as with AngularJS, then you need to add some code into your webconfig. The information can be found on this page:
https://www.asp.net/visual-studio/overview/2013/using-browser-link
for quick reference, just make this is in the webconfig:
<configuration> <system.webServer> <handlers> <add name="Browser Link for HTML" path="*.html" verb="*" type="System.Web.StaticFileHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" resourceType="File" preCondition="integratedMode" /> </handlers> </system.webServer> </configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With