Application Manifests for Office Solutions (2007 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

  • 2007 Microsoft Office system

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 solution.

Visual Studio Tools for Office uses the ClickOnce application manifest schema defined in the ClickOnce Application Manifest reference.

Visual Studio Tools for Office application manifests use the following ClickOnce elements and attributes.

Element

Description

Attributes

<assembly> Element (ClickOnce Application)

Required. Top-level element.

manifestVersion

<assemblyIdentity> Element (ClickOnce Application)

Required. Identifies the ClickOnce application's primary assembly.

name

version

publicKeyToken

processorArchitecture

language

<trustInfo> Element (ClickOnce Application)

Identifies the application security requirements.

None

<entryPoint> Element (ClickOnce Application)

Required. Identifies the application code entry point for execution.

name

dependencyName

customHostSpecified

<dependency> Element (ClickOnce Application)

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

None

<file> Element (ClickOnce Application)

Required. Identifies each non-assembly file that is used by the application. Can include Component Object Model (COM) isolation data associated with the file.

name

size

Visual Studio Tools for Office application manifests have the following element in the co.v1 namespace.

<entryPoint>
    <co.v1:customHostSpecified />
</entryPoint> 

Visual Studio Tools for Office application manifests also have the following elements and attributes in the vstav2 namespace.

<addIn>
    <entryPoints>
        <entryPoint>
        </entryPoint>
    </entryPoints>
    <update></update>
    <application>
        <customization>
        </customization>
    </application
</addIn>

Element

Description

Attributes

<customHostSpecified> Element

Required. Marks the manifest specifically as an Office solution.

None

<addin> Element (2007 System)

Required. Stores entry points into a single namespace.

None

<entryPoints> Element (2007 System)

Required. Groups all the assemblies to run.

None

<entryPoint> Element (2007 System)

Required. Identifies the assembly to run.

class

contract

<update> Element (2007 System)

Required. Configures updates for the solution.

enabled

expiration

<application> Element (2007 System)

Required. Wraps the application-specific information into a single node.

None

<customization> Element (2007 System)

Required. Stores application host-specific information in a separate namespace.

xmlns

<document> Element (2007 System)

Required only for document-level solutions. Stores customization-specific information.

solutionId

<appAddin> Element (2007 System)

Required only for application-level solutions. Stores customization-specific information.

application

loadBehavior

keyName

<friendlyName> Element (2007 System)

Optional. Stores the name of the add-in that appears in the list of installed add-ins.

None

<description> Element (2007 System)

Required only for application-level add-ins. Stores the description that appears in the list of installed programs.

None

<formRegions> Element (2007 System)

Required only for Outlook 2007 add-ins that include form regions.

None

<formRegion> Element (2007 System)

Required only for Outlook 2007 add-ins that include form regions.

name

You can manually edit application and deployment manifests in Visual Studio Tools for Office solutions. Application and deployment manifests must be re-signed by the Manifest Generation and Editing Tool (mage.exe and mageui.exe) after the manifests are edited. Sign the application manifest first and the deployment manifest next. For more information, see Manifest Generation and Editing Tool (Mage.exe) and Manifest Generation and Editing Tool, Graphical Client (MageUI.exe).

An application manifest is specific to a single version of a solution. For this reason, application manifests should be stored separately from deployment manifests. Visual Studio places the version-specific files in a subdirectory named after the associated version in the Application Files subdirectory in the publish folder. For more information, see Publishing Office Solutions (2007 System).

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

OutlookAddIn1.dll.manifest

ExcelWorkbook1.dll.manifest

Description

The following code example illustrates the sections of an application manifest that are specific to a Visual Studio Tools for Office solution. This is a Microsoft Office Excel 2007 document-level customization.

Code

<entryPoint>
    <co.v1:customHostSpecified />
</entryPoint> 
[...]
<vstav2:addIn xmlns:vstav2="urn:schemas-microsoft-com:vsta.v2">
    <vstav2:entryPoints>
        <vstav2:entryPoint class="ExcelWorkbook1.ThisWorkbook">
            <assemblyIdentity
                name="ExcelWorkbook1"
                version="1.0.0.0"
                language="neutral"
                processorArchitecture="msil" />
        </vstav2:entryPoint>
        <vstav2:entryPoint class="ExcelWorkbook1.Sheet1">
            <assemblyIdentity
                name="ExcelWorkbook1"
                version="1.0.0.0"
                language="neutral"
                processorArchitecture="msil" />
        </vstav2:entryPoint>
        <vstav2:entryPoint class="ExcelWorkbook1.Sheet2">
            <assemblyIdentity
                name="ExcelWorkbook1"
                version="1.0.0.0"
                language="neutral"
                processorArchitecture="msil" />
        </vstav2:entryPoint>
        <vstav2:entryPoint class="ExcelWorkbook1.Sheet3">
            <assemblyIdentity
                name="ExcelWorkbook1"
                version="1.0.0.0"
                language="neutral"
                processorArchitecture="msil" />
        </vstav2:entryPoint>
    </vstav2:entryPoints>
    <vstav2:update enabled="true">
        <vstav2:expiration maximumAge="7" unit="days" />
    </vstav2:update>
    <vstav2:application>
        <vstov3:customization
            xmlns:vstov3="urn:schemas-microsoft-com:vsto.v3">
        <vstov3:document
            solutionId="989..." />
        </vstov3:customization>
    </vstav2:application>
</vstav2:addIn>

Description

The following code example illustrates the sections of an application manifest that are specific to a Visual Studio Tools for Office solution. This is a Microsoft Office Outlook 2007 application-level add-in that includes a form region.

Code

<entryPoint>
    <co.v1:customHostSpecified />
</entryPoint> 
[...]
<vstav2:addIn xmlns:vstav2="urn:schemas-microsoft-com:vsta.v2">
    <vstav2:entryPoints>
        <vstav2:entryPoint class="OutlookAddIn1.ThisAddIn">
            <assemblyIdentity
                name="OutlookAddIn1"
                version="1.0.0.0"
                language="neutral"
                processorArchitecture="msil" />
        </vstav2:entryPoint>
    </vstav2:entryPoints>
    <vstav2:update enabled="true">
        <vstav2:expiration maximumAge="7" unit="days" />
    </vstav2:update>
    <vstav2:application>
        <vstov3:customization
            xmlns:vstov3="urn:schemas-microsoft-com:vsto.v3">
            <vstov3:appAddIn
                application="Outlook"
                loadBehavior="3"
                keyName="OutlookAddIn1">
                <vstov3:friendlyName>
                    OutlookAddIn1
                </vstov3:friendlyName>
                <vstov3:description>
                    OutlookAddIn1 - Outlook add-in created with 
                    Visual Studio Tools for Office
                </vstov3:description>
                <vstov3:formRegions>
                    <vstov3:formRegion
                        name="OutlookAddIn1.FormRegion1">
                        <vstov3:messageClass name="IPM.Note" />
                        <vstov3:messageClass name="IPM.Contact" />
                        <vstov3:messageClass name="IPM.Appointment" />
                    </vstov3:formRegion>
                </vstov3:formRegions>
            </vstov3:appAddIn>
        </vstov3:customization>
    </vstav2:application>
</vstav2:addIn>

Community Additions

ADD
Show: