<dependency> Element (Visual Studio Tools for Office Reference)

Note

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

For more information, see Features Available by Product Combination.

Project type

  • Document-level projects

  • Application-level projects

Microsoft Office version

  • Microsoft Office 2003

Identifies an assembly dependency that is required for the Visual Studio Tools for Office solution.

<dependency>
   <dependentAssembly>
      <assemblyIdentity
         name
         version
         publicKeyToken
         language
      />
   </dependentAssembly>
   <installFrom
      codebase
   />
</dependency>

Elements and Attributes

The dependency element is required. It has the following attribute.

Attribute

Description

Name

Required. Identifies the name of the application.

The dependency element has the following child elements.

dependentAssembly

Required. Contains the assemblyIdentity element. The assemblyIdentity element is described in the topic <assemblyIdentity> Element (Visual Studio Tools for Office Reference).

The dependentAssembly element has no attributes.

installFrom

Required. This element has the codebase attribute. The installFrom element has no child elements.

Remarks

All assemblies used by your application must have a corresponding dependency element. Dependent assemblies do not include assemblies that are preinstalled in the global assembly cache.

Application and deployment manifests in Visual Studio Tools for Office solutions are not signed, as ClickOnce manifests are. The manifests cannot be validated before they are used.

Some of the fields in application and deployment manifests that are generated by the publish tools are not used in Visual Studio Tools for Office solutions, including some fields that identify properties of the assembly such as size and version.

Example

The following code example illustrates a dependency element in a Visual Studio Tools for Office application manifest. This code example is part of a larger example provided for the Application Manifests for Office Solutions (2003 System) topic.

<dependency asmv2:name="Project1">
    <dependentAssembly>
        <assemblyIdentity name="Project1" 
            version="1.0.1.1"/>
    </dependentAssembly>
    <asmv2:installFrom codebase=
        "http://deployweb/project1/project1_1.0.1.1/project1.dll"/>
</dependency>

See Also

Reference

Application Manifests for Office Solutions (2003 System)