asp.net-core - 任务失败 : Activating language client: HtmlLanguageClient

标签 asp.net-core .net-core razor asp.net-core-mvc visual-studio-2022

每当我打开我的 Visual Studio 然后打开我的任何 Razor View 文件 (.cshtml) 时,我都遇到过这个问题。出现下图的问题,我失去了很多助手和智能感知,大大加快了我的工作速度。 无法在 super 用户社区上发布此内容,因为在那里附加图像缺乏声誉。

screenshot of message

最佳答案

搜索 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,问题“已解决”。

screenshot of folder mentioned to rename or delete

Microsoft 反馈票证链接:

My ticket: More objective

Original Ticket: More information

关于asp.net-core - 任务失败 : Activating language client: HtmlLanguageClient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71925218/

相关文章:

c# - 从 .NET Core 注销 IdentityServer4 让我重新登录

c# - 使用 AddSignInManager 时出现 ASP.NET Core MVC 异常

c# - Azure Functions 中的孤立异步任务

c# - 为什么 `IDictionary` 不允许您在其界面中通过键或默认值轻松获取值?

asp.net-core - HttpContext.User.Claims 和 IHttpContextAccessor 登录成功后均返回空值

c# - Razor MVC C#。替换 "."上的 ","

javascript - 具有特殊字符的数据库值,使用它们的 HTML 编号呈现,而不是使用数据库中的数据

c# - 在一个简单的 Viewbag.Title 中,获取 RuntimeBinderException

c# - ASP.NET Core - DI - 使用 Action<T> 或 IOption<T>

visual-studio-2015 - 为什么 ASP.NET Core 解决方案在迁移到 Visual Studio 2017 后会下降?