Export (0) Print
Expand All

How to: Change the Location of Document-Level Customizations

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

Redeployment of a document-level customization for Microsoft Office Word 2003 or Microsoft Office Excel 2003 is necessary when you must change the location of a deployed solution. For example, a developer might publish a solution to a testing server, and the IT department then redeploys the solution to a production server after approval. For Microsoft Visual Studio 2005 Tools for the Microsoft Office System solutions to continue to work, the application and deployment manifests must be updated with the new path to the solution files.

There are two types of redeployment scenarios for Word and Excel solutions:

  1. Editing the application manifest in the document directly, using code.

    This scenario is useful:

    • Before the solution is deployed to end users.

    • When the old server is suddenly taken out of service and end users cannot access the files on the old server.

    • When few end users are using the solution and it is easy to write script to update each user's document.

  2. Editing the manifest files on the server without using code to update the application manifest in the document.

    This scenario is useful:

    • After the solution is deployed to end users.

    • When the old server is still available and accessible to all end users.

    • When many end users are using the solution, and it is difficult to run script on each user's document.

NoteNote

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

Editing the Application Manifest Using Code

To redeploy using code to edit the application manifest

  1. Use the Publish Wizard to publish the solution to the testing server. For more information, see How to: Deploy Solution Files Using the Publish Wizard.

    The Publish Wizard copies the document and assemblies to the server, and creates the application and deployment manifests.

  2. Copy the application manifest, the assemblies, and the deployment manifest to the new location.

    There are now two sets of files, one on the old server and one on the new server.

  3. Edit the new application manifest so that it points to the new deployment manifest and the new assemblies. For more information, see Application Manifests for Office Solutions.

  4. Increase the version of the application manifest.

  5. Edit the new deployment manifest so that it points to the new application manifest. For more information, see Deployment Manifests for Office Solutions.

  6. Increase the version of the new deployment manifest.

  7. Update the application manifest that is embedded in the document to point to the new deployment manifest location. For more information, see How to: Change the Path to the Deployment Manifest Programmatically.

    NoteNote

    Visual Studio Tools for Office includes a sample that demonstrates how to create a tool that you can use to edit the embedded application manifest. For more information, see Application Manifest Editor Sample.

Editing the Manifests without Code

To redeploy by editing the files on the server

  1. Use the Publish Wizard to publish the solution to the testing server. For more information, see How to: Deploy Solution Files Using the Publish Wizard.

    The Publish Wizard copies the document and assemblies to the server, and creates the application and deployment manifests.

  2. Copy the application manifest, the assemblies, and the deployment manifest to the new location.

    There are now two sets of files: one on the old server and one on the new server.

  3. Edit the new application manifest so that it points to the new deployment manifest and the new assemblies. For more information, see Application Manifests for Office Solutions.

  4. Increase the version of the application manifest.

  5. Edit the new deployment manifest so that it points to the new application manifest. For more information, see Deployment Manifests for Office Solutions.

  6. Increase the version of the new deployment manifest.

  7. Edit the old deployment manifest so that it points to the new application manifest.

  8. Increase the version of the old deployment manifest.

The next time an end user opens your solution document, the document will check the old deployment manifest and be redirected to the new application manifest. The document will download the new application manifest that contains pointers to the new assemblies and deployment manifest, and will use the files in the new locations.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft