指定项目模板正常运行所需的操作系统的最低版本。 此元素用于创建 Windows 8.x 应用商店应用的项目模板。
该值 RequiredPlatformVersion 与操作系统的版本直接进行比较。 如果高于 RequiredPlatformVersion 操作系统版本,则模板不会显示在 “新建项目 ”对话框中。 若要为 Windows 8 或更高版本指定模板,请设置为 RequiredPlatformVersion 6.2.0。 若要为 Windows 8.1 或更高版本指定模板,请设置为 RequiredPlatformVersion 6.3.0。
指定 RequiredPlatformVersion=8 的模板与以前的客户 Windows 8.x 应用商店模板兼容。
VSTemplate TemplateData .....TargetPlatformName RequiredPlatformVersion
语法
<RequiredPlatformVersion> OperatingSystem </RequiredPlatformVersion>
特性和元素
无。
特性
无。
子元素
无。
父元素
| 元素 | 说明 | 
|---|---|
| TemplatePlatformName | 指定项目模板面向的平台。 | 
文本值
需要一个文本值。
备注
此文本指定模板所需的最低操作系统版本。
示例
此示例指定项目模板面向 Windows 8 或更高版本。
<VSTemplate Type="Project" Version="3.0.0"    xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
    <TemplateData>
        <TargetPlatformName>Windows</TargetPlatformName>
            <RequiredPlatformVersion>6.3.0</RequiredPlatformVersion>
    </TemplateData>
    <TemplateContent>
    </TemplateContent>
</VSTemplate>