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.
Static files are stored within the project's web root directory. The default directory is {content root}/wwwroot , but it can be changed with the UseWebRoot method.
An important feature nearly every web application needs is the ability to serve up files (static files) from the file system. Static files like JavaScript files, images, CSS files that we have on the file system are the assets that ASP.NET Core application can serve directly to clients.
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.
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