I am working with VS2022 ASP.NET Core 6 MVC.
I tried to drag & drop one CSS file from explorer to a .cshtml file.
It should be made automatically like this code the same way-VS 2019
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
But prohibition icon shown when I am trying the drag & drop operation.
I started again VS 2022 with Administrator permissions, but it's still the same situation.
Any idea?
Drag & Drop is not yet supported in LSP-based editors. You can refer to this article:
https://developercommunity.visualstudio.com/t/cant-drag-javascript-or-css-files-onto-an-html-pag/1526177
There is a work around suggested by Microsoft: Tools-->Options-->Text Editor-->HTML-->Advanced-->Use Legacy Razor Editor for Asp.NET (Yes) -->OK
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