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

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

<Content>
    ...
</Content>

屬性和項目

下列章節會說明屬性、子項目和父項目。

屬性

無。

子項目

項目

描述

FileName

必要項目。

指定元件的檔案名稱。

DisplayName

必要項目。

指定將會出現在 Visual Studio 內容安裝程式內的元件名稱。

描述

必要項目。

指定將會出現在 Visual Studio 內容安裝程式內,用以描述元件的工具提示文字。

FileContentType

必要項目。

指定元件為增益集 (Add-In)、巨集專案、IntelliSense 程式碼片段、入門套件或 Visual Studio 範本,或工具箱控制項。

ContentVersion

必要項目。

指定元件支援哪個版本的 Visual Studio。

屬性

選擇性項目。

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

父項目

項目

描述

VSContent

必要項目。

包含與社群內容項目有關的所有中繼資料 (Metadata)。

備註

Content 是必要項目。

範例

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

<VSContent xmlns="https://schemas.microsoft.com/developer/vscontent/2005">
    <Content>
        <FileName>MyMacroProject.vsmacros</FileName>
        <DisplayName>My Macro Project</DisplayName>
        <Description> A macro project created for this example.</Description>
        <FileContentType>Macro Project</FileContentType>
        <ContentVersion>1.0</ContentVersion>
    </Content>
</VSContent>

請參閱

參考

Visual Studio 內容安裝程式結構描述參考