Skip to content

Latest commit

 

History

History
80 lines (65 loc) · 2.45 KB

references-element-visual-studio-templates.md

File metadata and controls

80 lines (65 loc) · 2.45 KB
title description ms.date ms.subservice ms.topic f1_keywords helpviewer_keywords author ms.author manager
References Element (Visual Studio Templates)
Learn about the References element and how it groups the assembly references that the template adds to projects.
11/04/2016
general-ide
reference
<References> element [Visual Studio Templates]
References element [Visual Studio Templates]
maiak
maiak
mijacobs

References element (Visual Studio templates)

Groups the assembly references that the template adds to projects.

<VSTemplate> <TemplateContent> <References>

Syntax

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

Attributes and elements

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.

Remarks

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.

Example

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>

See also