VSTemplate Element (Visual Studio Templates)


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

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

<VSTemplate Type="TemplateType" Version="x.x.x">  
    <TemplateData>    </TemplateData>  
    <TemplateContent>    </TemplateContent>  

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


TypeIdentifies the template as a project template or an item template. This attribute can have a value of Project or Item.
VersionSpecifies a version number for the template. Templates in Visual Studio 2010 and Visual Studio 2012 have a Version attribute value of 3.0.0.

Child Elements

TemplateDataRequired element.

Specifies data that categorizes the template, and defines how it displays in the New Project or Add New Item dialog box.
TemplateContentRequired element.

Specifies the contents of the template.
WizardExtensionOptional element.
WizardDataOptional element.

Parent Elements


The VSTemplate element is the root element of .vstemplate files.

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