SventoryMang
SventoryMang

Reputation: 10478

Item Template for Web and/or MVC in a VSIX?

Is there a way to specify what type of project an item template is for besides CSharp and VB? I have tried setting ProjectType to Web and ProjectSubType to CSharp as it says in this article http://msdn.microsoft.com/en-us/library/ms171386(v=vs.110).aspx. This causes the item template to not appear anywhere. I've also tried the reverse, which gets it to show up under C#, but not under web.

Ideally I'd like for it to show under MVC, but even Web would just be fine. How can do I that? Since this is a VSIX I can't and don't want to just drop it into the appropriate area of the item templates folder.

<ProjectType>CSharp</ProjectType>
  <ProjectSubType>Web</ProjectSubType>
<RequiredFrameworkVersion>4.0</RequiredFrameworkVersion>
<NumberOfParentCategoriesToRollUp>2</NumberOfParentCategoriesToRollUp>

Upvotes: 1

Views: 331

Answers (1)

Kariem Ali
Kariem Ali

Reputation: 203

You need to mimic the hierarchy in you VSIX project where you included the template file. For example, if you want the template to appear under the node Web under C# and you have the template file under the folder ItemTemplates in your VSIX project, you need to move the template file to:

ItemTemplates > CSharp > Web

Then:
<ProjectType>CSharp</ProjectType> <NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>

Would be sufficient. You don't need to set <ProjectSubType></ProjectSubType>

Upvotes: 1

Related Questions