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