asp.net-corebrowser-link

How to enable browser link for static files in ASP.NET 5


Is there a way to get Browser Link working with static files under ASP.NET 5? My Startup.cs currently has the following:

public void Configure(IApplicationBuilder app)
{
    app.UseBrowserLink();
    app.UseStaticFiles();
    app.UseFileServer(new FileServerOptions
    {
        EnableDefaultFiles = true
    });
}

which is apparently not enough to do the trick. I'm running VS 2015 CTP 6.

Previously under System.Web it was possible by setting up a handler for .html files like in this answer, but I'm not sure what the ASP.NET 5 equivalent would be.

Someone has also posted the question at the ASP.NET forums, but it has no answers so far.


Solution

  • In the CTPs that have been released so far, static files aren't supported well by Browser Link for ASP.NET 5, because the Browser Link core needs more work to deal with optimizations in static file handling in the new framework. This scenario will be fully supported in a later build of Visual Studio.