<dependency> Element (Visual Studio Tools for Office Deployment 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 the version of the Visual Studio Tools for Office solution to install, and the location of the application manifest. 

<dependency>
   <dependentAssembly
      codeBase
      size
      hash
      hashalg
   >
      <assemblyIdentity
         name
         version
      />
   </dependentAssembly>
</dependency>

Elements and Attributes

The dependency element is required. It has no attributes. A deployment manifest can have multiple dependency elements.

The dependency element usually describes dependencies that the main application has on assemblies contained within a Visual Studio Tools for Office solution. If your main solution assembly consumes an assembly called DotNetAssembly.dll, then that assembly must be listed in a dependency section. A dependency, however, can have other types of dependencies, such as dependencies on a specific version of the common language runtime, on an assembly in the global assembly cache (GAC), or on a COM object. Visual Studio Tools for Office does not initiate download and installation of these types of dependencies, but it does prevent the solution from running if one or more of the dependencies cannot be fulfilled.

The dependency element contains the following elements.

dependentAssembly

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

assemblyIdentity

Required. This element is a child of the dependentAssembly element. The assemblyIdentity element is described in the topic <assemblyIdentity> Element (Visual Studio Tools for Office Deployment Reference).

Remarks

Deployment manifests typically have a single assemblyIdentity element that identifies the name and version of the application manifest.

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 shows a dependency element in a Visual Studio Tools for Office deployment manifest. This code example is part of a larger example provided for the Deployment Manifests for Office Solutions (2003 System) topic.

<dependency>
    <dependentAssembly 
        codebase="ExcelApplication1_1.0.0.1\ExcelApplication1.manifest"
        size="2518" hash="0DE6E54FDCF3334A23D627402EF65668CBFB8587"
        hashalg="SHA1">
        <assemblyIdentity name="ExcelApplication1.manifest" 
            version="1.0.0.1" />
    </dependentAssembly>
</dependency>

See Also

Reference

Deployment Manifests for Office Solutions (2003 System)