TargetPlatformName 元素(Visual Studio 模板)

指定项目模板面向的平台。 此元素用于指定项目模板用于创建 Windows 8.x 应用商店应用。

语法

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

特性和元素

下列各节描述了特性、子元素和父元素。

特性

无。

子元素

元素 说明
RequiredPlatformVersion 指定项目模板面向的操作系统版本。

父元素

元素 描述
TemplateData 将此模板分类并定义此模板在 “新建项目”“添加新项” 对话框中的显示方式。

文本值

需要一个文本值。

备注

文本必须为 Windows

示例

此示例指定项目模板面向 Windows 8 或更高版本。

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

另请参阅