C
C#β€’7mo ago
Paulvv

Visual Studio 2022 Extension

I'm working on a visual studio 2022 Extension. But as soon as i import it inside the visual studio 2022 "Tools" -> "Code Snippet Manager" it will work in files like: HomeController.cs but not in home.cshtml (All .cshtml files). What kind of <Code Language="" do i need to put in here to get it working in .cshtml files. I have tried 'html' & "razor" but that didn't work.
No description
8 Replies
Dharmang
Dharmangβ€’7mo ago
Code snippets schema reference - Visual Studio (Windows)
Learn about the IntelliSense Code Snippet XML schema and how you can use them to increase your own productivity.
Dharmang
Dharmangβ€’7mo ago
you can also use the latest schema
333fred
333fredβ€’7mo ago
@David Wengier (πŸ‡¦πŸ‡ΊπŸ¦˜πŸ¨) does the lsp editor even support code snippets?
davidwengier
davidwengierβ€’7mo ago
No, but in 17.8 we'll find html snippets and show them in completion ourselves, so I would have expected that to work. @Andrew (ryzngard | they/them) is the expert here though
lycian
lycianβ€’7mo ago
Correct, only inbox c# snippets are available prior to 17.9 P1. 17.9 P1 will add all HTML snippets. In LSP snippets show in the completion list so enter or tab will insert them
lycian
lycianβ€’7mo ago
There is a backlog item for VS to support snippets similar to how VS Code does, in which case we'll be out of the equation entirely. If you try 17.9 P1 and still hit issues feel free to reach out or file an issue at https://github.com/dotnet/razor/issues
GitHub
Issues Β· dotnet/razor
Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code. - Issues Β· dotnet/razor
davidwengier
davidwengierβ€’7mo ago
oh, is it 17.9 P1? oops, thought it was 17.8. my b
lycian
lycianβ€’7mo ago
17.8 seemed to drag on forever imo 😦 I think it went in around 17.8 P4
Want results from more Discord servers?
Add your server
More Posts