Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Application Manifests for Office Solutions

An application manifest in a Microsoft Visual Studio 2005 Tools for the Microsoft Office System solution is an XML file that describes assemblies that are loaded into a Microsoft Office 2003 solution. In Microsoft Office Word 2003 and Microsoft Office Excel 2003 solutions, 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 Microsoft Office Outlook 2003 solutions, 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 and Deploying Application-Level Add-ins.

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

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 Word and Excel solutions) or placed in the build output folder (for Outlook solutions) every time you build a Visual Studio Tools for Office project. When you publish a solution 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 and Deploying Application-Level Add-ins.

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.

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

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>
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.