Browser Link with ASP.NET Core v1.0 in Visual Studio 2015 Update 3

前端 未结 3 1337
太阳男子
太阳男子 2021-02-14 12:44

I am using Visual Studio 2015 Update 3 and wanting to use the Browser Link feature with my ASP.NET Core v1.0 WebApp project... but I can\'t get Browser Link to work.

    <
3条回答
  •  有刺的猬
    2021-02-14 13:09

    I am using VS2015 Update 3 too.

    Browserlink is also supported for ASP.NET Core projects of course.

    Add the following code to your Startup.cs -> Configure method:

      app.UseBrowserLink();
    

    But if you use --> .NET Core 1.0 - VS 2015 Tooling RC then this could be your issue.

    Set appSetting “vs:EnableBrowserLink” to “true

    Set compilation debug to true in your web.config file. Browserlink will be disabled when debug is false!

    
      
    
    

    Try to click

    "Refreshed Linked Browsers",

    in my case no connections showed up initially, but after refresh! After that when you hover over the refresh icon, a tooltip showing the connected browsers is displayed, like this for example:

    In my project.json I have the following setting:

     "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
    

    and Browserlink has to be enabled:

    You can see if it's loaded in the browsers network tab:

提交回复
热议问题