Compartir a través de


Reference Element (VSX Schema)

Optional. Specifies a dependency that the associated extension relies on.

<Reference ID="Namespace.ToReference" minversion="1.0" maxversion="2.1">
  <Name>...</Name>
  <MoreInfoUrl>...</MoreInfoUrl>
  <VSIXPath>...</VSIXPath>
</Reference>

Attributes and Elements

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

Attributes

Attribute

Description

ID

Required. The ID of the referenced product or other dependency.

minversion

Optional. The earliest version of the dependency that is supported by the extension.

maxversion

Optional. The most recent version of the dependency that is supported by the extension.

Child Elements

Element

Description

Name Element

Required. The name of the dependency.

MoreInfoURL Element

Optional. A URL that points to information about the dependency.

VSIXPath Element

Optional. A path to a .vsix file included in this deployment package to load before installing the associated extension.

Parent Elements

Element

Description

References Element

Optional. Contains specifications for the dependencies that the extension relies on.

Remarks

Use Reference elements in nested VSIX packages when the primary extension to install depends on other extensions included in the package. Extension Manager first checks each reference to see if it is installed on the system, and then installs it if needed. For more information, see How to: Add a Reference to a VSIX Package.

Each Reference element points to the VSIX manifest of an extension to install. The ID attribute in the Reference element must match the ID attribute in the Identifier Element of the .vsix file that represents the referenced dependency.

At installation, Extension Manager uses the values of the optional minversion and maxversion attributes to determine whether to load the extension, depending on the availability of the described versions. If only minversion is set, Extension Manager will accept any version that is equal to or more recent than the setting. If only maxversion is set, Extension Manager will accept any version that is equal to or earlier than the setting.

Element Information

Namespace

https://schemas.microsoft.com/developer/vsx-schema/2010

Schema Name

VSIX Manifest

Validation File

VSIXManifestSchema.xsd

Can be Empty

No

See Also

Other Resources

VSIX Extension Schema Reference

Visual Studio Extension Deployment