I would do a repair on your visual studio 2022. There is an updated version you can install
Visual Studio 2022 Version 17.1.5 Missing "class" template
As of this morning when I use the "Add New Item" menu, or even use the shortcut in the context menu to add a new class, it can't find the template for a new class. The "Add New Item" menu in general does not contain anything for adding a new class. This obviously isn't the end of the world since I can just create a new code file and manually add the definitions, but it's really a bump in my traditional workflow.
I have not installed any new extensions in months and really I have not made any changes to my development environment in recent weeks. If I navigate to the "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class" directory I can see both the Class.cs file as well as the Class.vstemplate file.
I've tried a few things such as removing some of the template folders out of the User/Documents folder and such but nothing so far has worked. Has anyone else encountered this issue?
2 answers
Sort by: Most helpful
-
-
Shawn 1 Reputation point
2022-06-06T13:48:55.907+00:00 I did a repair, I will try updating to the new version and see if that helps.