RequiredPlatformVersion 元素(Visual Studio 模板)

指定项目模板需要正常工作的操作系统的最低版本。 此元素用于访问创建 Windows 应用商店 apps 的项目模板。

RequiredPlatformVersion 值直接与操作系统会比较的版本。 如果 RequiredPlatformVersion 高于操作系统版本,模板不会出现在 新建项目 对话框。 为 Windows 8 若要指定模板或更高版本中,请将 RequiredPlatformVersion 到 6.2.0。 为 Windows 8.1 若要指定模板或更高版本中,请将 RequiredPlatformVersion 到 6.3.0。

指定 RequiredPlatformVersion=8 的模板与上一客户 Windows 应用商店 模板兼容。

<RequiredPlatformVersion> OperatingSystem </RequiredPlatformVersion>

特性和元素

无。

特性

无。

子元素

无。

父元素

元素

描述

TemplatePlatformName

指定该平台的项目模板目标。

文本值

需要一个文本值。

备注

此文本指定模板所需的操作系统最低版本。

示例

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

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

请参见

参考

TargetPlatformName 元素(Visual Studio 模板)

Visual Studio 模板架构参考

概念

在 Visual Studio 中创建项目和项的模板