Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Reference
 Reference Element (IntelliSense Cod...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio
Reference Element (IntelliSense Code Snippets)

Specifies information about the assembly references required by the code snippet.

<Reference>
    <Assembly>... </Assembly>
    <Url>... </Url>
</Reference>

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

Attributes

None.

Child Elements

Element

Description

Assembly

Required element.

Contains the name of the assembly referenced by the code snippet. There must be exactly one Assembly element in a Reference element.

Url

Optional element.

Contains a URL that provides more information about the referenced assembly. There may be zero or one Url elements in a Reference element.

Parent Elements

Element

Description

References

Grouping element for Reference elements.

The Reference element is only supported for Visual Basic projects.

The Reference element in the following code snippet shows that the code snippet requires an assembly reference to System.Data.dll.

<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <!-- Insert Header information here. -->
        </Header>
        <Snippet>
            <References>
                <Reference>
                    <Assembly>System.Data.dll</Assembly>
                    <Url>www.microsoft.com</Url>
                </Reference>
            </References>
            <Declarations>
                <!-- Insert literal and object declarations here -->
            </Declarations>
            <Code Language="VB">
                <!-- Insert code here. -->
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker