Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to: Deploy Solutions for Offline Use

If your Visual Studio Tools for Office solution must be usable offline, you have two main options:

  • Deploy the assembly to each end user's computer.

  • Deploy the assembly to a Web server so that it is cached on the end user's computer after the first use.

Deploying to Each User's Computer

To deploy a document-level customization to each end user's computer

  1. Update the embedded application manifest so that it uses an environment variable to point to the assembly. Instead of using a specific drive letter and path, use %ProgramFiles% or %UserProfile% to begin the path. For example, the path might look like this:

    %ProgramFiles%/MyApplication/MyApplication.dll

    For more information about updating the assembly path in an embedded application manifest, see How to: Update Application Manifest Assembly Paths Programmatically.

  2. Copy the document and the assembly to each end user's computer. You can create a Setup program to install the files by using an application such as Microsoft Windows Installer. For more information, see Deploying Applications and Components.

    For articles that describe how to create and use a Setup project to deploy a document-level customization, see "Deploying Visual Studio 2005 Tools for Office Solutions Using Windows Installer (Part 1 of 2)" (http://go.microsoft.com/fwlink/?linkid=57779) and "Deploying Visual Studio 2005 Tools for Office Solutions Using Windows Installer: Walkthroughs (Part 2 of 2)" (http://go.microsoft.com/fwlink/?linkid=57780).

    NoteNote

    To set an environment variable on the user's computer during installation, add a value to the key HKLM\System\CurrentControlSet\Control\Session Manager\Environment. The user must restart the computer after installation before the new value is recognized.

  3. Update the security policy on the computer to grant full trust to the assembly, and any dependent assemblies. For more information, see How to: Grant Permissions to Folders and Assemblies.

To deploy an application-level add-in to each end user's computer

  1. Update the application manifest that is created when you build the solution so that it uses an environment variable to point to the assembly. Instead of using a specific drive letter and path, use %ProgramFiles% or %UserProfile% to begin the path. For example, the path might look like this: %ProgramFiles%/MyAddIn/MyAddIn.dll

    The assembly path is specified by the codebase attribute of the installFrom element, which is a child of the dependency element. For more information, see <installFrom> Element (Visual Studio Tools for Office Reference).

  2. Copy the assembly and the application manifest to each end user's computer. You can use the default Setup project that is included with your add-in project. For more information, see Setup Projects for Application-Level Add-ins.

    NoteNote

    To set an environment variable on the user's computer during installation, add a value to the key HKLM\System\CurrentControlSet\Control\Session Manager\Environment. The user must restart the computer after installation before the new value is recognized.

  3. Update the security policy on the computer to grant full trust to the assembly, and any dependent assemblies. For more information, see How to: Grant Permissions to Folders and Assemblies.

Deploying to a Web Server

If you deploy an assembly to a network location and you want it to be cached to the user's local computer for offline use, the assembly must be located on a Web server and accessed through an HTTP or HTTPS path. You cannot use a UNC path or mapped network drives for offline solutions, unless you use IntelliMirror to synchronize folders instead of relying on the Internet Explorer cache. For more information, see Offline Model for Office Solutions.

Make sure that the application manifest and deployment manifest use the correct HTTP or HTTPS path to the assembly. If you use the Publish Wizard, the manifests are created for you. For more information, see Deploying Document-Level Customizations and Deploying Application-Level Add-ins.

To set the assembly path

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft