asp.net-mvcbrowser-link

How to get browser link working in asp mvc 6 project


I have created an empty asp mvc 6 project and added a index.html and a styles.css file. If i make changes to the stylesheet the browser does not get the newly created style, only if I reload the page does it work. If i press ctrl to get the browserlink options nothing happens there is no toolbar in the bottom left hand corner.

I am using IIS Express with the browserlink option enabled use ctrl f5 run without debugging.


Solution

  • You still need to press the refresh button in Visual Studio to reload the page. Browser Link simply tells each of your selected browsers to refresh. It doesn't make it happen automatically while you make changes.

    Also, you need to be debugging. Browser Link works in debugging, not simply by running the application.

    See the guide at http://www.asp.net/visual-studio/overview/2013/using-browser-link for more information.

    Update

    Looks like you'll need to edit your app's config.json file (takes the place of web.config in ASP 5):

    {
        "AppSettings": {
            "vs:EnableBrowserLink": "true"
        }
    }
    

    Update 2

    If you're using an appsettings.json file, you don't need the AppSettings wrapper object:

    {
        "vs:EnableBrowserLink": "true"
    }
    

    For more information, see the official documentation for configuration in ASP 5 at http://docs.asp.net/en/latest/fundamentals/configuration.html