<application> element (Office development in Visual Studio)

Applies to: yesVisual Studio noVisual Studio for Mac

The application element of the vstav3 namespace wraps the description of Office solutions. The child elements are different for document-level customizations and VSTO Add-ins.

Syntax for document-level customizations

<application>
  <customization
    id
    <document
      solutionId
    />
  </customization>
</application>

Syntax for application-level add-ins

<application>
  <customization
    id
    <appAddin
      application
      loadBehavior
      keyName>
    <friendlyName></friendlyName>
    <description></description>
    <formRegions></formRegions>
  </customization>
</application>

Elements and attributes

The application element of the vstav3 namespace is the node that wraps all the customization-specific information that is contained in the vstov4 namespace.

The application element has no attributes.

The application element has the following element.

Customization

The role of the customization element in the vstov3 namespace is defined in <customization> Element (Office Development in Visual Studio).

Document-level customization example

Description

The following code example illustrates an application element in a document-level Office solution deployed using ClickOnce. This code example is part of a larger example provided in Application Manifests for Office Solutions.

Code

<vstav3:application>
  <vstov4:customizations
    xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4">
    <vstov4:customization>
      <vstov4:document
        solutionId="73e" />
    </vstov4:customization>
  </vstov4:customizations>
</vstav3:application>

VSTO Add-in example

Description

The following code example illustrates an application element in an application-level Office solution deployed using ClickOnce. This code example is part of a larger example provided in Application Manifests for Office Solutions.

Code

<vstav3:application>
  <vstov4:customizations
    xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4">
    <vstov4:customization>
      <vstov4:appAddIn
        application="Outlook"
        loadBehavior="3"
        keyName="ContosoOutlookAddIn">
        <vstov4:friendlyName>
          ContosoOutlookAddIn
        </vstov4:friendlyName>
        <vstov4:description>
          ContosoOutlookAddIn - Outlook VSTO Add-in
          created with Visual Studio Tools for Office
        </vstov4:description>
        <vstov4:formRegions>
          <vstov4:formRegion
              name="OutlookAddIn1.FormRegion1">
            <vstov4:messageClass name="IPM.Note" />
            <vstov4:messageClass name="IPM.Contact" />
            <vstov4:messageClass name="IPM.Appointment" />
          </vstov4:formRegion>
        </vstov4:formRegions>
      </vstov4:appAddIn>
    </vstov4:customization>
  </vstov4:customizations>
</vstav3:application>

See also