Attributes 元素(Visual Studio 内容安装程序)

指定有关组件的自定义信息,该信息随 FileContentType 的不同而不同。

<Attributes>
    <Attribute>...</Attribute>
</Attributes>

特性和元素

以下几节描述了特性、子元素和父元素。

特性

无。

子元素

元素

说明

特性

必选。

指定有关组件的可选信息,比如编程语言。

父元素

元素

说明

Content

将 .vscontent 文件中的内容分组。

备注

Attributes 是可选元素。

示例

下面的示例演示项目模板社区内容组件的元数据。

<VSContent xmlns="https://schemas.microsoft.com/developer/vscontent/2005">
    <Content>
        <FileName>MyProjectTemplate.zip</FileName>
        <DisplayName>Sample Project Template</DisplayName>
        <Description>A project template created for this example.</Description>
        <FileContentType>VSTemplate</FileContentType>
        <ContentVersion>2.0</ContentVersion>
        <Attributes>
            <Attribute name="ProjectType" value="Visual Basic"/>
            <Attribute name="ProjectSubType" value=""/>
            <Attribute name="TemplateType" value="Project"/>
        </Attributes>
    </Content>
</VSContent>

请参见

参考

Visual Studio 内容安装程序架构参考