NumberOfParentCategoriesToRollUp (Visual Studio Templates)

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at NumberOfParentCategoriesToRollUp (Visual Studio Templates).

Specifies the number of parent categories that will display the template in the New Project dialog box.

<VSTemplate>
<TemplateData>
<NumberOfParentCategoriesToRollUp>

<NumberOfParentCategoriesToRollUp>  
    1  
</NumberOfParentCategoriesToRollUp>  

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

None.

Parent Elements

ElementDescription
TemplateDataCategorizes the template and defines how it displays in either the New Project or the Add New Item dialog box.

An integer value is required.

This value specifies the number of parent categories that will display the template in the New Project dialog box.

NumberOfParentCategoriesToRollUp is an optional element.

This example illustrates the metadata for a Visual C# Windows application. If a template with this metadata is placed two folder levels below the top level Visual C# node, the template will appear in the top level node in the New Project dialog box. If the NumberOfParentCategoriesToRollUp is not set, the template only appears in the node in which it is physically located.

<VSTemplate Type="Project" Version="3.0.0"  
    xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">  
    <TemplateData>  
        <Name>My template</Name>  
        <Description>A basic starter kit</Description>  
        <Icon>TemplateIcon.ico</Icon>  
        <ProjectType>CSharp</ProjectType>  
        <NumberOfParentCategoriesToRollUp>2</NumberOfParentCategoriesToRollUp>  
    </TemplateData>  
    <TemplateContent>  
        <Project File="MyStarterKit.csproj">  
            <ProjectItem>Form1.cs<ProjectItem>  
            <ProjectItem>Form1.Designer.cs</ProjectItem>  
            <ProjectItem>Program.cs</ProjectItem>  
            <ProjectItem>Properties\AssemblyInfo.cs</ProjectItem>  
            <ProjectItem>Properties\Resources.resx</ProjectItem>  
            <ProjectItem>Properties\Resources.Designer.cs</ProjectItem>  
            <ProjectItem>Properties\Settings.settings</ProjectItem>  
            <ProjectItem>Properties\Settings.Designer.cs</ProjectItem>  
        </Project>  
    </TemplateContent>  
</VSTemplate>  

Visual Studio Template Schema Reference
Creating Project and Item Templates

Show: