Share via

TemplateContent Element (Visual Studio Templates)


This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Specifies the contents of the template.




Attributes and Elements

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


Attribute Description
BuildOnLoad Specifies whether to build the solution when a project is created from the template.

Child Elements

Element Description
ProjectCollection Optional element.

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

Specifies files or directories to add to the project.
References Optional element.

Specifies the assembly references required for an item template.
ProjectItem Optional element.

Specifies a file contained in the template.
CustomParameters Optional element.

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

Parent Elements

Element Description
VSTemplate Required 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">  

See Also

Visual Studio Template Schema Reference
Creating Project and Item Templates