12

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.

Community
  • 1
  • 1
Kjetil Limkjær
  • 1,500
  • 12
  • 22

1 Answers1

8

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.

Joe Davis
  • 792
  • 5
  • 8
  • 1
    Hi @Joe Davis so you have any updates on on this with the recent builds of asp.net 5.0? – Alex KeySmith Jul 29 '15 at 14:28
  • 1
    Static file support didn't make it in time for Visual Studio 2015 RTM, but updates to the tooling for ASP.NET 5 will continue to be released over the next several months. This feature is high on our backlog for one of those builds. – Joe Davis Jul 31 '15 at 00:48
  • 2
    Is there a link to where this is being tracked? @JoeDavis – Alex Angas Jan 21 '16 at 06:15
  • Not yet. It's still a high priority to finish before the final release of ASP.NET Core 1.0. – Joe Davis Mar 09 '16 at 16:10
  • 1
    Then I guess we cannot expect it before 2017 if we wait for the final release of ASP.NET Core 1.0 – Nemmy Apr 21 '16 at 07:42
  • I tried it in VS 15.3 Preview 2 with ASP.NET Core 2.0 Preview 1 and when I call `UseBrowserLink` my `Index.html` is not served while other static contents, like images, are served well. – Andrii Jun 15 '17 at 18:55