Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Task failed: Activating language client: HtmlLanguageClient

I've faced this problem anytime I open my Visual Studio and then open any of my Razor view files (.cshtml). The problem of image below appears and I lose lots of helpers and intellisense, speeding down my work a lot. Can't post this on super user community because lack of reputation to attach images there.

screenshot of message

like image 855
Lari Avatar asked Dec 06 '25 10:12

Lari


1 Answers

Searching on Microsoft feedback, I've opened on ticket on my own and find one workaround for those who don't find any guidance so far. Basically, the workaround is to rename caching folder of language server to Visual Studio recriate a correct new one version. (Links on end of this answer).

Can you try deleting the WebTools\Languages\LanguageServers\ComponentModelCache folder contents (or rename the folder), and let me know if you still hit the issue? I haven’t been able to reproduce yet, and I’m trying to narrow down if this is an issue generating the cache from a clean state or updating the cache from a prior version.

For those who not want to read the links below, the folder mentioned above is %localappdata%\Microsoft\VisualStudio\17.0_\WebTools\Languages\LanguageServers\ComponentModelCache. Rename or delete this folder, than reopen Visual Studio and the problem is "solved".

screenshot of folder mentioned to rename or delete

Links of Microsoft Feedback tickets:

My ticket: More objective

Original Ticket: More information

like image 102
Lari Avatar answered Dec 09 '25 04:12

Lari