Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0)
Deploying Document-Level Customizations (2003 System)

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

Project type

  • Document-level projects

Microsoft Office version

  • Microsoft Office 2003

For more information, see Features Available by Application and Project Type.

Deploying a document-level customization for Microsoft Office Word 2003 or Microsoft Office Excel 2003 generally means working with four files:

  • The Word or Excel file (template, document, or workbook) that the end user works in.

  • The assembly that contains your compiled custom code and any dependent assemblies such as resources, satellites, or helper libraries.

  • The deployment manifest (if applicable).

  • The application manifest (if applicable).

When you deploy your solution, consider the following basic guidelines:

To deploy the solution, you copy the document and assembly, and optionally the application and deployment manifest, to the deployment location. For more information about the types of deployment, see Deployment Models (2003 System).

Visual Studio Tools for Office includes the Publish Wizard, which creates the application and deployment manifests and copies all the files to the deployment location for you. However, you can also do these steps manually. For more information, see How to: Deploy Office Solutions (2003 System) and How to: Deploy Solution Files Using the Publish Wizard (2003 System).

Publish Wizard

The Publish command on the project's shortcut menu in Solution Explorer starts the Publish Wizard. You identify the location of the folder that you want to publish the solution to, and the wizard copies the document and the deployment manifest into that folder. For more information, see How to: Deploy Solution Files Using the Publish Wizard (2003 System).

The wizard also copies the assemblies and an updated application manifest into a subfolder of the main deployment folder. The subfolder contains a version number. If the option Automatically increment revision with each release is selected in the Publish pane of the Project Designer, a new subfolder is created every time that you publish the solution. Older versions remain available. The application and deployment manifests ensure that the solution always uses the current assembly. For more information, see Application and Deployment Manifests in Office Solutions, How to: Deploy Solution Files Using the Publish Wizard (2003 System), Publish Page, Project Designer (2003 System), and Publish Wizard (2003 System).

Updating Deployed Assemblies (Versioning)

If you deploy a solution named ExcelWorkbook1 to the folder C:\DeployFolder, the file structure will look like this:

C:\DeployFolder

This folder contains the following two files and subfolder:

  • The workbook (ExcelWorkbook1.xls).

  • The deployment manifest (ExcelWorkbook1.application).

    C:\DeployFolder\ExcelApplication1_1.0.0.0

    This folder contains the following files:

    • The assemblies.

    • The application manifest (ExcelWorkbook1.dll.manifest).

    • A copy of the workbook.

    • A copy of the deployment manifest.

If you update the assembly and republish the solution, the directory structure will look like this:

C:\DeployFolder

This folder contains the following two files and subfolders:

  • The workbook (with an updated embedded application manifest).

  • The deployment manifest (updated to point to the application manifest in C:\DeployFolder\ExcelWorkbook1_1.0.0.1).

    C:\DeployFolder\ExcelWorkbook1_1.0.0.0

    This folder contains the following files:

    • The original assemblies.

    • The original application manifest.

    • The original workbook.

    • The original deployment manifest.

    C:\DeployFolder\ExcelWorkbook1_1.0.0.1

    This folder contains the following files:

    • The updated assemblies.

    • The updated application manifest.

    • A copy of the updated workbook.

    • A copy of the updated deployment manifest.

This structure will be repeated every time that you update the assembly. If you update the document or workbook so that it is no longer compatible with the existing assembly, you should deploy the solution to a new deployment folder.

Using MSBuild at a Command Prompt

You can also use MSBuild at a command prompt to publish your solution. When you use MSBuild at a command prompt, you can publish your solution files to one location, and simultaneously modify the application manifest embedded in the workbook or document to point to a deployment manifest at a different location. To run MSBuild at a command prompt to publish your solution, use the following syntax.

msbuild.exe /target:Publish /property:UpdateUrl=<update location> /property:PublishDir=<publish location> <project file>

For example, if you want to publish a C# project named ExcelWorkbook1 to the shared folder \\PublishServer\PublishFolder, but you expect to move the deployment manifest, external application manifest, and the assembly to the shared folder \\DeploymentServer\DeploymentFolder in the future, you would run the following command.

msbuild.exe /target:Publish /property:PublishDir=\\PublishServer\PublishFolder\ /property:UpdateUrl=\\DeploymentServer\DeploymentFolder\ C:\ExcelWorkbook1\ExcelWorkbook1.csproj

For more information about using MSBuild at a command prompt, see Building ClickOnce Applications from the Command Line.

Application and Deployment Manifests

Application and deployment manifests are used to make it possible for a document to update itself with the latest assembly. For more information, see Application and Deployment Manifests in Office Solutions.

Updating Deployment Manifests

You might change the deployment manifest for a solution several times during the lifetime of the solution. There are two main reasons why you would update the deployment manifest:

Updating Application Manifests

You might not ever have to directly update an existing application manifest that is in use in a solution. Usually, you create a new application manifest and use the deployment manifest to load the new application manifest into the solution. However, there are two main reasons why you might want to update an application manifest in a document directly:

Deploying Localized Microsoft Office Solutions

Most aspects of deploying localized versions of Visual Studio Tools for Office solutions are the same as you encounter when you deploy other kinds of solutions using Visual Studio. However, there are some additional considerations regarding creating and distributing localized versions of Visual Studio Tools for Office solutions. For more information, see Globalization and Localization of Office Solutions, How to: Localize Excel Solutions, and Deployment and Localization.