Udostępnij za pośrednictwem


Application Manifests for Office Solutions (2003 System)

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 Application and Project Type.

Project type

  • Document-level projects

  • Application-level projects

Microsoft Office version

  • Microsoft Office 2003

An application manifest in a Visual Studio Tools for Office solution is an XML file that describes assemblies that are loaded into a Microsoft Office 2003 solution. In document-level customizations, one copy of the application manifest is embedded in the solution document, and another copy is kept on the deployment server to make it possible to update the solution easily. In application-level add-ins, one copy of the application manifest is located on the client computer, and another copy is kept on the deployment server to make it possible to update the solution easily. For more information, see Deploying Document-Level Customizations (2003 System) and Deploying Application-Level Add-Ins (2003 System).

Visual Studio Tools for Office uses an application manifest schema that is similar to the schema defined for ClickOnce. Only elements and attributes listed in this table are supported for Visual Studio Tools for Office solutions. Any elements and attributes that are part of the ClickOnce schema but are not listed here are ignored, with no error raised.

Application manifests have the following elements and attributes.

Element

Description

Attributes

<assembly> Element (Visual Studio Tools for Office Application Reference)

Required. Top-level element.

manifestVersion

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

Required. Identifies the version of the application manifest, and describes dependent assemblies.

name

version

publicKeyToken

language

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

Required. Identifies the application code entry point for execution.

name

dependencyName

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

Required. Identifies each dependency required for the application to run. Optionally identifies assemblies that need to be preinstalled.

name

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

Required. Provides information about dependent assemblies.

None

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

Required. Provides a path to the deployment location of dependent assemblies when used as a child of a dependency element, and to the location of the deployment manifest when used as a child of the assembly element.

codebase

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

Required. Indicates the class to be invoked for an entryPoint element.

class

Remarks

The server name in the path to the assemblies must be all lowercase, or else the assemblies will not be cached.

An application manifest is generated and embedded in the document (for document-level customizations) or placed in the build output folder (for application-level add-ins) every time you build a Visual Studio Tools for Office project. When you publish a solution by using the Publish Wizard, a copy of the application manifest is also created in the output folder and then copied to the publish destination. The Visual Studio Tools for Office task GenerateAndPersistAppInfoTask generates the application manifest, not the MSBuild task GenerateApplicationManifest.

An application manifest is specific to a single version of a deployed solution. For this reason, application manifests should be stored separately from deployment manifests. The common convention is to place the application manifest in a subdirectory named after the associated version. For more information, see Deploying Document-Level Customizations (2003 System) and Deploying Application-Level Add-Ins (2003 System).

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.

File Name Syntax

The name of an application manifest file should be the name of the application as identified in the assemblyIdentity element, followed by the extension .manifest. For example, an application manifest that refers to the ExcelApplication1 solution would use the following file name syntax.

excelapplication1.manifest

Example

The following code example illustrates an application manifest for a Visual Studio Tools for Office solution.

<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" 
    xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"
    xmlns="urn:schemas-microsoft-com:asm.v1"
    xmlns:asm.v2="urn:schemas-microsoft-com:asm.v2"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation=
       "urn:schemas-microsoft-com:asm.v1 manifest.2.0.0.9.adaptive.xsd"
>

    <assemblyIdentity name="Project1.manifest" 
        version="1.0.1.1"/>
    <asm.v2:entryPoint name="Startup" dependencyName="Project1">
        <asm.v2:clrClassInvocation class="Sheet1"/>
    </asm.v2:entryPoint>
    <asm.v2:entryPoint name="Startup" dependencyName="Project1">
        <asm.v2:clrClassInvocation class="Sheet2"/>
    </asm.v2:entryPoint>
    <asm.v2:entryPoint name="Startup" dependencyName="Project1">
        <asm.v2:clrClassInvocation class="Sheet3"/>
    </asm.v2:entryPoint>
    <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>
    <asm.v2:installFrom codebase=
        "http://deployweb/project1/project1.application"/>
</assembly>

See Also

Tasks

How to: Update Application Manifest Assembly Paths Programmatically (2003 System)

How to: Remove Managed Code Extensions from Documents (2003 System)

Concepts

Application and Deployment Manifests in Office Solutions

Runtime Storage Control Overview

Reference

Deployment Manifests for Office Solutions (2003 System)