Visual Studio 2022 ASP.NET Core 6 Default application and Add folder to workspace in Chrome DevTools is not working anymore

Issue

After some update to either Visual Studio (I have the same issue in both VS2019 and VS2022) or Chrome I can no longer update the CSS in DevTools and have it reflect and persist the changes to site.css file in my project. Instead when I try to change a CSS property I get the following in the DevTools console:

Unable to find a stylesheet to update. Updating all local css files.
15:54:01.800 aspnetcore-browser-refresh.js:82 

And the green dot disappears from my CSS pane immediately after I hit the up or down arrow on my keyboard to try and change the CSS value.

Why is that? It used to work not too long ago. I think it’s been broken for me for half a year or so now.

I’ve been googling but haven’t find any good resources. Or maybe I’m the only one coding directly in Chrome? 🙂 Surely this can’t be the case?

If anyone knows a workaround please share because I’m really frustrated atm 🙂

Solution

Disabling "Enable CSS Auto-Sync" seems to do the trick.

enter image description here

Edit: The above no longer works for me for some reason. I managed to find another fix on SO: https://stackoverflow.com/a/70096917/687549

And here are some screenshots:

enter image description here
enter image description here

Answered By – PussInBoots

Answer Checked By – Timothy Miller (AngularFixing Admin)

Leave a Reply

Your email address will not be published.