片段不适用于 Visual Studio 2022

Snippets doesn't work on Visual Studio 2022

版本:17.0.1 专业版

我无法使用任何代码段。我很难过,尤其是在 Razor 上。请帮忙

VS2022 中的新 Razor 编辑器与之前版本中的旧编辑器不具有完全相同的功能;但是,它确实具有特定于较新的 ASP.NET 核心运行时功能的新功能。在实现功能对等方面仍在继续努力,因此请发送反馈以帮助团队确定需求最高的功能的优先级。

您可以在 HTML 编辑器设置(工具 -> 选项 -> 文本编辑器 -> HTML -> 高级 -> 使用旧版 Razor 编辑器 ASP.NET核心)

编辑: This blog post calls out several of the missing features. As mentioned above, the team is working on making most of them work again, but that is largely prioritized based on the feedback being received through the Razor Tooling github 或 VS 反馈系统(团队同时查看两者)。