Snippets don't work on Visual Studio 2022
Asked Answered
L

1

7

Version: 17.0.1 Professional

I can't use any snippet. I'm having a hard time, especially on Razor. Help please

enter image description here

Lackluster answered 19/11, 2021 at 7:9 Comment(1)
Please specify "doesn't work". What happens if you try? Did it work on older versions? Does it still work on older versions?Migrant
S
20

The new Razor editor in VS2022 does not have full feature parity with the older one from previous versions; it does however have new features specific to newer ASP.NET Core runtime features. There is still continued effort in achieving feature parity, so please send feedback to help the team prioritize which features are in highest demand.

You can turn toggle back to the old editor in the HTML editor settings (Tools -> Options -> Text Editor -> HTML -> Advanced -> Use legacy Razor editor for ASP.NET Core) Tools/Options settings

Edit: 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 or the VS Feedback system (the team looks at both).

Shih answered 20/11, 2021 at 9:17 Comment(2)
Thanks, this was a dealbreaker for me in upgrading to VS2022 (it also breaks JavaScript snippets). This article from 1-DEC-2021 mentions some missing features in the new Razor engine, several of which are real productivity hits to me. devblogs.microsoft.com/visualstudio/…Unduly
The issue : github.com/dotnet/razor/issues/6397Auriga

© 2022 - 2024 — McMap. All rights reserved.