每当我打开我的 Visual Studio 然后打开我的任何 Razor View 文件 (.cshtml) 时,我都遇到过这个问题。出现下图的问题,我失去了很多助手和智能感知,大大加快了我的工作速度。 无法在 super 用户社区上发布此内容,因为在那里附加图像缺乏声誉。
最佳答案
搜索 Microsoft 反馈后,我自己打开了工单,并为那些到目前为止没有找到任何指导的人找到了一种解决方法。基本上,解决方法是将语言服务器的缓存文件夹重命名为 Visual Studio,重新命名正确的新版本。 (此答案末尾的链接)。
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.
对于那些不想阅读下面链接的人,上面提到的文件夹是%localappdata%\Microsoft\VisualStudio\17.0_\WebTools\Languages\LanguageServers\ComponentModelCache。重命名或删除此文件夹,然后重新打开 Visual Studio,问题“已解决”。
Microsoft 反馈票证链接:
关于asp.net-core - 任务失败 : Activating language client: HtmlLanguageClient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71925218/