aspnet / BrowserLink

Browser Link loader for Visual Studio integration
Apache License 2.0
17 stars 21 forks source link

CSS Auto-Sync Not Working #62

Closed spottedmahn closed 6 years ago

spottedmahn commented 6 years ago

When I make a change to wwwroot\css\site.css and I have browser link connected to Chrome, shouldn't Chrome automatically update?

I'm using VS 2017: 15.4 for an Asp.Net Core 1.1 MVC web app. I started with the MVC template and deleted some stuff I don't need.

image

image

What other info can I provide to track this down?

nhwilly commented 6 years ago

Same here. VS15.4.1, .Net Core 1.1 - manual refresh works, but nothing else does. And that's only if I save the file first. That's to be expected though, right?

spottedmahn commented 6 years ago

No, that is not to be expected per Enable or Disable CSS Auto Sync:

When CSS Auto-Sync is enabled, connected browsers are automatically refreshed when you make any change to CSS files.

redpeaks33 commented 6 years ago

try this. it works for me. https://docs.microsoft.com/en-us/aspnet/visual-studio/overview/2013/using-browser-link#enabling-browser-link-for-static-html-files

spottedmahn commented 6 years ago

thanks @redpeaks33! I'll give that a try!

brunolau commented 6 years ago

Is there a way to identify what's the cause?

I'm having the very same issue. When I create a brand new project using ASP.NET classic MVC template, CSS sync works, when I create a brand new project for ASP.NET MVC Core [New project => Web Application (MVC), app.UseBrowserLink() is present], CSS doesn't sync

VS 15.6.2 .NET Core 2.0

WereDev commented 6 years ago

So it looks like this was closed, but was there a resolution to this? I'm using VS 15.8.4 and .Net Core 2.1 and it still doesn't work. Yes I used NuGet to get Microsoft.VisualStudio.Web.BrowserLink and yes I have app.UseBrowserLink(). I can see the browser is connected, but css and other static files are not being updated.

spottedmahn commented 6 years ago

I threw in the towel and moved on.

WereDev commented 6 years ago

I'm sad that this hasn't been addressed because in a situation when one is doing Typescript (eg Angular) work, those generally get compiled and dropped into the wwwroot folder so it would be nice if it would refresh as I change things. As it is I need to use ngserve and break that out during dev so that I can maintain a decent development process which then means it's not like deployment which has already caused a few issues.