Export (0) Print
Expand All

Application Manifest Editor Sample

Download sample

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005

    -or-

    Visual Studio Team System

  • Microsoft Office 2003

This sample tool provides a graphical user interface and a command-line interface that enable you to view and modify the application manifest in a Microsoft Visual Studio 2005 Tools for the Microsoft Office System document. This tool also enables you to view and modify data that is cached in the document. For more information, see Application and Deployment Manifests in Office Solutions and Data in Office Solutions Overview.

The application manifest is information that is used at runtime or design time to describe the solution that is associated with a document. The application manifest is embedded in the document and is accessible through the ServerDocument object.

The ServerDocument object provides an API for working with the application manifest. This sample tool uses that API to enable you to view and modify the application manifest and data cached in a Visual Studio Tools for Office solution document.

NoteNote

This tool only modifies the manifest that is in the document. If there is a deployment manifest that points to a newer manifest, any changes made with this tool will be overwritten the next time the document is opened and retrieves the newer manifest.

Security noteSecurity Note

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

For information about installing the sample project on your computer, see How to: Download Sample Files in Help Topics.

To run this sample

  • Press F5.

To export a manifest

  1. On the File menu, click Open, and then open a Visual Studio Tools for Office solution document.

  2. On the Edit menu, click Export Manifest.

  3. Specify the name and location of the manifest file you want to create, and then click Save.

To import a manifest

  1. On the File menu, click Open, and then open a document. The document does not have to be a Visual Studio Tools for Office solution document.

  2. On the Edit menu, click Import Manifest.

  3. Browse to the manifest file that you want to import, select the file, and then click Open.

  4. On the File menu, click Save.

To remove a customization from a document

  1. On the File menu, click Open, and then open a Visual Studio Tools for Office solution document.

  2. On the Edit menu, click Remove Customization.

  3. Click Yes to remove the customization.

  4. On the File menu, click Save.

To add a customization to a document

  1. On the File menu, click Open, and then open a document. The document does not have to be a Visual Studio Tools for Office solution document.

  2. On the Edit menu, click Add Customization.

  3. Browse to the assembly that you want to add, select the assembly, and then click Open.

    The assembly and an application manifest are added to the document. If a manifest was already in the document, it is replaced with the new one.

  4. On the File menu, click Save.

To view cached data

  1. On the File menu, click Open, and then open a Visual Studio Tools for Office solution document.

  2. Click the Cached Data tab.

  3. Select an item in the tree view to display the data.

    You can make changes to the data and save the changes by clicking Save on the File menu.

To remove cached data

  1. On the File menu, click Open, and then open a Visual Studio Tools for Office solution document.

  2. On the Edit menu, click Remove Cached Data.

  3. Click Yes to remove the cached data from the document.

  4. On the File menu, click Save.

Demonstrates

  • Role and purposes of the application manifest.

  • How to work with ServerDocument and associated objects.

  • How to view and manage cached data.

  • How to attach and detach a customization.

  • How to delete and compress cached data.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft