How to create a Visual Studio project template that appears in the Web category?

I created a project template that is installed through the VSIX extension. This works fine, but it only appears in the Visual C # category. I'm having trouble figuring out how to get it to appear in the Visual C #> Web category.

I tried following the documentation for ProjectType and ProjectSubType , but when I specify ProjectType=Web and ProjectSubType=CSharp , it doesn't display at all.

Looking at the .vstemplate files in the ProjectTemplatesCache folder, I see examples of project templates with ProjectType=CSharp and ProjectSubType=Web , but for me this only shows it in the Visual C # root category. Not displayed in Visual C #> Web.

Any ideas?

+7
source share
1 answer

Do this, create a new folder for custom item templates, say this:

c:\VS\Templates\Item

Now on VS go to Tools β†’ Options β†’ Projects and Solutions and set the option User item templates location: to the folder above, click OK.

You will notice that some folders will be created inside the c:\VS\Templates\Item folder. You need to create a new Web folder in the Visual C# folder, which was created automatically, so you will have:

c:\VS\Templates\Item\Visual C#\Web

Drop the zip file using the item template and the item will appear in the Web category when creating new items. You can create other categories by simply creating new folders in the Visual C# folder (or any other category folder, for that matter).

Good luck.

+8
source

All Articles