1.17.0 "Emmet: Expand Abbreviation" no longer working in cshtml files
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.1.403
Commit: 04e15494b6
Runtime Environment: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.403\
Host (useful for support): Version: 2.1.5 Commit: 290303f510
.NET Core SDKs installed: 1.1.10 [C:\Program Files\dotnet\sdk] 2.1.202 [C:\Program Files\dotnet\sdk] 2.1.302 [C:\Program Files\dotnet\sdk] 2.1.400 [C:\Program Files\dotnet\sdk] 2.1.401 [C:\Program Files\dotnet\sdk] 2.1.402 [C:\Program Files\dotnet\sdk] 2.1.403 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 1.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.3-servicing-26724-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
VS Code version: 1.28.2 (user setup) C# Extension version: 1.17.0
Steps to reproduce
- Make sure the following setting is present: “emmet.includeLanguages”: { “razor”: “html” },
- Try typing “div” and hit tab
Expected behavior
div is replaced by <div></div>
Actual behavior
no replacement occurs
Remarks
The setting “razor.disabled”: true did not restore functionality, but disabling the extension altogether did restore functionality.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
This works for me as a workaround using version 1.32.0-insider:
This issue still exists in this nightly build.
Did you mean to suggest changing
“emmet.includeLanguages”: { “razor”: “html” }
to
“emmet.includeLanguages”: { “aspnetcorerazor”: “html” }
as a fix? Because it kind of worked!
Emmet expansion for tags, such as div and span has its functionality restored. However, emmet espansion for “.alert”, which is expected to expand to
<div class="alert"></div>
does not have its functionality restored. It works in html, but not in cshtml.Is there some work-around where I can continue to have 1.17 installed and just give up its new cshtml functionality in favor of the previous emmet functionality?
In any case, I will file this in the place you suggested.