Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Reference
 References Element (Visual Studio T...

  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
References Element (Visual Studio Templates)

Groups the assembly references that the template adds to projects.

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

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

Attributes

None.

Child Elements

Element

Description

Reference

Required element.

Specifies the assembly reference to add when the item is added to a project. There must be one or more Reference elements in a References element.

Parent Elements

Element

Description

TemplateContent

Specifies the contents of the template.

References is an optional child element of TemplateContent.

The Reference and References elements can only be used in .vstemplate files that have a Type attribute value of Item. For more information on adding references to templates, see How to: Add References to Templates.

The following example illustrates the TemplateContent element of an item template. This XML adds references to the System.dll and System.Data.dll assemblies.

<TemplateContent>
    <References>
        <Reference>
            <Assembly>
                System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
            </Assembly>
        </Reference>
        <Reference>
            <Assembly>
                System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
            </Assembly>
        </Reference>
    </References>
    ...
</TemplateContent>
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