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

Specifies the platform that the project template targets. This element is used to specify that a project template is used to create Windows 8.x Store apps.

<VSTemplate>  
    <TemplateData>   
        <TargetPlatformName> OperatingSystem</TargetPlatformName>  

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

Attributes

None.

Child Elements

ElementDescription
RequiredPlatformVersionSpecifies the version of the operation system that the project template targets.

Parent Elements

ElementDescription
TemplateDataCategorizes the template and defines how it displays in either the New Project or the Add New Item dialog box.

A text value is required.

The text must be Windows.

This example specifies that the project template targets Windows 8 or later.

<VSTemplate Type="Project" Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">   
    <TemplateData>   
        <TargetPlatformName>Windows</TargetPlatformName>   
        <RequiredPlatformVersion>8</RequiredPlatformVersion>   
    </TemplateData>   
    <TemplateContent> </TemplateContent>  
</VSTemplate>  

Creating Project and Item Templates
Visual Studio Template Schema Reference

Show: