Attributes 項目 (Visual Studio 內容安裝程式)

指定此元件的自訂資訊,此元件會根據 FileContentType 而異。

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

屬性和項目

下列各節將說明屬性、子項目和父項目。

屬性

無。

子項目

項目

描述

屬性

必要項。

指定與元件相關的選擇性 (Optional) 資訊,例如程式語言。

父項目

項目

描述

Content

群組成 .vscontent 檔案中的內容。

備註

Attributes 是選擇性項目。

範例

下列範例將顯示專案範本社群內容元件的中繼資料 (Metadata)。

<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 內容安裝程式結構描述參考