Tuesday, May 3, 2011

Visual Studio project template multiple Project Types

I've got a project template which I want to appear under both "Visual C#" and its subtype "Test". I can get it to appear in one but not the other by placing it in \Visual Studio 2008\Templates\ProjectTemplates\Visual C# and \Visual Studio 2008\Templates\ProjectTemplates\Visual C#\Test respectively.

I've tried setting the following attributes in the vstemplate file

<ProjectType>CSharp</ProjectType>
<ProjectSubType>Test</ProjectSubType>

But it doesn't seem to work.

I've also looked at the default templates for ideas but can't find anything.

Is there a way of doing this without putting a copy in both locations?

From stackoverflow
  • Just found the NumberOfParentCategoriesToRollUp tag. By saying

    <NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
    

    It puts it in the parent as well (the template goes in the Test folder). The description claims it doesn't work for user templates but it works for me.

0 comments:

Post a Comment