سؤال

I have created a project template that is installed via a VSIX extension. This is working fine, but it only shows up in the Visual C# category. I am having a lot of trouble figuring out how to get it to show up in the Visual C# > Web category.

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

Looking at .vstemplate files in the ProjectTemplatesCache folder, I see examples of project templates that have ProjectType=CSharp and ProjectSubType=Web, but for me that only makes it show up in the root Visual C# category. Doesn't show up in Visual C# > Web.

Any ideas?

هل كانت مفيدة؟

المحلول

Do this, create a new folder for custom item templates, let's say it's:

c:\VS\Templates\Item

Now on VS go to Tools -> Options -> Projects and Solutions and set the User item templates location: option to the folder above, hit OK.

You will notice that inside c:\VS\Templates\Item folder some folders will be created. What you have to do is to create a new Web folder inside the Visual C# folder that has been created automatically, therefore you'll have:

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

Drop the zip file with the item template there and the item will show up under the Web category when you are creating new items. You can create other categories as well just by creating new folders under Visual C# folder (or any other category folder for that matter).

Good luck.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top