TemplateContent Element (Visual Studio Templates)


For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

Specifies the contents of the template.



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


BuildOnLoadSpecifies whether to build the solution when a project is created from the template.

Child Elements

ProjectCollectionOptional element.

Specifies the organization and contents of multi-project templates.
ProjectOptional element.

Specifies files or directories to add to the project.
ReferencesOptional element.

Specifies the assembly references required for an item template.
ProjectItemOptional element.

Specifies a file contained in the template.
CustomParametersOptional element.

Specifies any custom parameters that are to be used when a project or item is created from the template.

Parent Elements

VSTemplateRequired element.

Contains all the metadata for the project template, item template, or starter kit.

TemplateContent is a required element.

The following example shows the metadata for a project template for a Visual C# application.

<VSTemplate Type="Project" Version="3.0.0"  
        <Name>My template</Name>  
        <Description>A basic starter kit</Description>  
        <Project File="MyStarterKit.csproj">  

Visual Studio Template Schema Reference
Creating Project and Item Templates