简体   繁体   English

HTML 代码片段在 Visual Studio 2019 中不起作用

[英]HTML Code snippets not working Visual Studio 2019

I have been tried to search for the settings in VS2019 about the HTML code snippets/Auto-Completion in Razor Pages/Views.我试图在 Razor 页面/视图中搜索 VS2019 中关于 HTML 代码片段/自动完成的设置。 It was working earlier however it is not working now.它早些时候工作,但现在不工作。

Example:例子:

supposed I type the following line of code in Index.cshtml:-假设我在 Index.cshtml 中键入以下代码行:-

div.table.table-sm.table-stripped.table-bordered "press tab"

It should display the following structure:-它应该显示以下结构:-

<div class="table table-sm table-stripped table-border></div>

I have only Resharper Ultimate installed on my machine as an extension.我的机器上只安装了 Resharper Ultimate 作为扩展。 Which settings should I be looking at?我应该查看哪些设置?

I had the same issue.我遇到过同样的问题。 Resolved by repairing vs2019 and install ZenCoding extension.通过修复 vs2019 并安装 ZenCoding 扩展解决。

  1. Open Visual Studio Installer.打开 Visual Studio 安装程序。
  2. On the version you wish to repair, click More.在您要修复的版本上,单击更多。
  3. Click Repair.单击修复。
  4. Open your project in vs2019>Extensions>Manage Extensions>search and download ZenCoding.在 vs2019 > Extensions > Manage Extensions > 搜索并下载 ZenCoding 打开你的项目。
  5. Restart vs2019.重启vs2019。

PS: All of my downloaded extensions and templates were deleted after repairing. PS:我下载的插件和模板都在修复后被删除了。

You can try other methods as mentioned in this link您可以尝试此链接中提到的其他方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM