We recommend using Visual Studio 2017

SolutionFolder Element (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 SolutionFolder Element (Visual Studio Templates).

Groups projects in multi-project templates.


<SolutionFolder Name="DirectoryName">  

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


NameRequired attribute.

The name of the solution folder.

Child Elements

ProjectTemplateLinkOptional element.

Specifies the path to the .vstemplate file of one project in a multi-project template.
SolutionFolderOptional element.

Groups projects in multi-project templates.

Parent Elements

ProjectCollectionSpecifies the organization and contents of multi-project templates.
SolutionFolderGroups projects in multi-project templates.

Multi-project templates act as containers for two or more projects. The SolutionFolder element is used to organize the projects in the template into groups. The folders specified by SolutionFolder elements are created as solution folders in the project in Visual Studio. For more information on multi-project templates, see How to: Create Multi-Project Templates.

This example uses the SolutionFolder element to divide the multi-project template into two groups, Math Classes and Graphics Classes. The template contains four projects, two of which are placed in each solution folder.

<VSTemplate Version="3.0.0" Type="ProjectGroup"  
        <Name>Multi-Project Template Sample</Name>  
        <Description>An example of a multi-project template</Description>  
            <SolutionFolder Name="Math Classes">  
                <ProjectTemplateLink ProjectName="MathClassLib1">  
                <ProjectTemplateLink ProjectName="MathClassLib2">  
            <SolutionFolder Name="Graphics Classes">  
                <ProjectTemplateLink ProjectName="GraphicsClassLib1">  
                <ProjectTemplateLink ProjectName="GraphicsClassLib2">  

Visual Studio Template Schema Reference
Creating Project and Item Templates
How to: Create Multi-Project Templates