References Element (IntelliSense Code Snippet)

Groups individual Reference elements.

<CodeSnippets>
  <CodeSnippet>
    <Snippet>
      <References>

<References>
    <Reference>... </Reference>
</References>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

Element

Description

Reference

Optional element.

Contains information about assembly references for the code snippet. There may be zero or more Reference elements in a References element.

Parent Elements

Element

Description

Snippet

Contains the references, imports, declarations, and code for the code snippet.

Remarks

The References element is only supported for Visual Basic projects.

Example

The References element in the following code snippet shows that the code snippet requires assembly references to System.Data.dll and System.Windows.Forms.dll.

<CodeSnippets xmlns="https://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>Create a data adapter</Title>
            <Description>Creates a SqlDataAdapter object.</Description>
            <Author>Microsoft Corporation</Author>
            <Shortcut>createadapter</Shortcut>
        </Header>
        <Snippet>
            <References>
                <Reference>
                    <Assembly>System.Data.dll</Assembly>
                    <Url>www.microsoft.com</Url>
                </Reference>
                <Reference>
                    <Assembly>System.Windows.Forms.dll</Assembly>
                </Reference>
            </References>
            <Declarations>
                <!-- Insert literal and object declarations here. -->
            </Declarations>
            <Code Language="VB">
                <!-- Insert code here. -->
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

See Also

Concepts

Code Snippets Schema Reference