question

Shawn-9200 avatar image
0 Votes"
Shawn-9200 asked SMPSZ-1178 published

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?

dotnet-csharpvs-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, what is your project type? Does updating VS work for you?

0 Votes 0 ·
vb2ae avatar image
0 Votes"
vb2ae answered

I would do a repair on your visual studio 2022. There is an updated version you can install

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Shawn-9200 avatar image
0 Votes"
Shawn-9200 answered SMPSZ-1178 published

I did a repair, I will try updating to the new version and see if that helps.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Shawn-9200


Have you found a solution yet i jst encountred this problem and i tried repar and update but no chance.
please let me konow if you had any luck.
Thanks

0 Votes 0 ·