There are different steps for deploying the two types of projects:
Each type of solution can be deployed in several ways, depending on the deployment model you are using.
For more information about the deployment models for Microsoft Visual Studio 2005 Tools for the Microsoft Office System solutions, see Deployment Models. For more information about document-level customizations and application-level add-ins, see Office Solutions Architecture Overview.
Deploying Document-Level Customizations
To deploy your document-level customizations, you must deploy these components:
-
A Microsoft Office Word 2003 or Microsoft Office Excel 2003 file (template, document, or workbook) that the end user works in.
-
An assembly that contains your compiled custom code, plus any referenced assemblies.
Optionally, to take advantage of automatic assembly updates for the end user you must also deploy:
-
An application manifest. If you use the Publish Wizard, this file is created for you.
-
A deployment manifest. If you use the Publish Wizard, this file is created for you.
For more information, see Deploying Document-Level Customizations. For information about prerequisites for running Office solutions on the end user's computer, see How to: Prepare End User Computers to Run Office Solutions.
To deploy the assembly on a network and the document as a local copy
To deploy local copies of the document and assembly
-
In Visual Studio, add a Setup project to your solution and configure the options as desired. For more information, see Windows Installer Deployment Tasks.
The Setup project is used to create a Windows Installer (.msi) file that will install your solution.
-
If you want to set security policy at the User level, include a custom action in your Setup project that uses the Code Access Security Policy tool (Caspol.exe) to grant permissions to the assemblies for the current user. For more information, see Security Requirements to Run Office Solutions and Code Access Security Policy Tool (Caspol.exe).
-
Run the custom action at the end of deployment. For more information, see Custom Actions Management in Deployment.
-
Deploy the Windows Installer file to each end user. If you do not set security policy for the user during installation, you must grant permissions to the assemblies using another method before the solution will run.
To deploy the document and assembly on a network
Deploying Application-Level Add-ins
To deploy your add-in, you must deploy these components:
-
An assembly that contains your compiled add-in code, plus any referenced assemblies.
-
The application manifest for the add-in.
Optionally, to deploy your add-in to a network location to take advantage of automatic assembly updates for the end user, you must also deploy a deployment manifest. If you use the Publish Wizard, this file is created for you.
For more information, see Deploying Document-Level Customizations. For information about prerequisites for running Office solutions on the end user's computer, see How to: Prepare End User Computers to Run Office Solutions.
To deploy the add-in assembly on a network
To deploy the add-in assembly on each computer
-
In Visual Studio, configure the options for the Setup project included in your add-in solution as desired. For more information, see Setup Projects for Application-Level Add-ins.
-
Grant full trust to the assemblies in each end user's security policy. If you want to set security policy in the Setup project, add a custom action that uses the Code Access Security Policy tool (Caspol.exe) to grant permissions to the assemblies for the current user. For more information, see Security Requirements to Run Office Solutions and Code Access Security Policy Tool (Caspol.exe).
-
Run the custom action at the end of deployment. For more information, see Custom Actions Management in Deployment.
-
Deploy the Windows Installer file to each end user. If you do not set security policy for the user during installation, you must grant permissions to the assemblies using another method before the solution will run.
See Also