Udostępnij za pośrednictwem


TargetPlatformName Element (Visual Studio Templates)

Note

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 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.

Syntax

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

Attributes and Elements

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

Attributes

None.

Child Elements

Element Description
RequiredPlatformVersion Specifies the version of the operation system that the project template targets.

Parent Elements

Element Description
TemplateData Categorizes the template and defines how it displays in either the New Project or the Add New Item dialog box.

Text Value

A text value is required.

Remarks

The text must be Windows.

Example

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

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

See Also

Creating Project and Item Templates
Visual Studio Template Schema Reference