This documentation is archived and is not being maintained.

Project Element (Visual Studio Templates) 

Specifies the files or directories to add to the project.


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


Attribute Description


Required attribute.

Specifies the name of the project file in the template .zip file.


Optional attribute.

A Boolean value that specifies whether the project file has parameter values that must be replaced when a project is created from the template. Default value is false.


Optional attribute.

Specifies the name of the project file when a project is created from the template.

Child Elements

Element Description


Optional element.

Specifies a folder to add to the project.


Optional element.

Specifies a file to add to a project.

Parent Elements

Element Description


Required element.

Project is an optional child element of TemplateContent.

The Project element is used to specifiy a project, and therefore, is only valid in project templates.

Project elements can have Folder children elements or ProjectItem children elements, but not a mixture of both Folder and ProjectItem children elements.

Visual Studio automatically renames the project file name based on the name entered by the user in the New Project dialog box. Use the TargetFileName attribute if you want to provide an alternate file name for project files created with the template.

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

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