Deploying an Office solution using Windows Installer (Mary Lee)

Published 10 April 08 05:39 PM

Visual Studio 2008 offers a ClickOnce deployment experience for solutions developed for the 2007 Microsoft Office system.  However, if you want to deploy additional files, add extra registry keys, or use SMS, you may still be interested in creating a Windows Installer package.

Here are the very basic steps to configure your setup project:

1. Add the release build or publish output of your solution. Then manually add the application and deployment manifests (.dll.manifest and .vsto files).

2. For application-level projects, create the registry keys so that the Microsoft Office application can find your add-in. For more information, see Registry Entries for Application-Level Add-Ins. For the add-in name, use a syntax similar to [CompanyName].[AddinName].

3. For document-level projects, update custom document properties which point to the location of the deployment manifest. If you leave the document in the same relative location compared to the customization assembly, you don't need to update the _AssemblyLocation property. But if you want to move the document to a user's desktop or Documents folders, you'll have to update the _AssemblyLocation property. For more information, see Custom Document Properties Overview.

You must still use ClickOnce security to trust your solution. You can deploy your .msi at this point, but you'll see a trust prompt asking whether the solution should be installed or not. To avoid prompting your end users, sign your manifests with a known and trusted certificate or pre-trust the solution by creating an inclusion list entry. For more information, see Security in Office Solutions (2007 System).

Bonus: there is sample code to help you complete the steps of deploying additional files, updating the document's _AssemblyLocation, and creating an inclusion list entry.  Visit http://code.msdn.microsoft.com/VSTO3MSI in the MSDN Code Gallery to download the sample code.

For all the details, read the deployment whitepapers at Deploying a Visual Studio Tools for the Office System 3.0 Solution for the 2007 Microsoft Office System Using Windows Installer (Part 1 of 2) and Deploying a Visual Studio Tools for the Office System 3.0 Solution for the 2007 Microsoft Office System Using Windows Installer (Part 2 of 2).

If you run into trouble implementing this, visit the VSTO MSDN forum at http://forums.microsoft.com/msdn/showforum.aspx?forumid=16&siteid=1 to search for answers or ask your questions. 

Mary Lee, programming writer.

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Andrew Coates ::: MSFT said on May 15, 2008 10:04 PM:

While the default mechanism for deploying VSTO v3 Add-Ins is ClickOnce, there there's now also a documented

# Sanket said on May 23, 2008 3:24 PM:

I followed the steps you have mentioned. However, while building the setup project I am getting "Rebuild all failed" message without any errors or warnings in the "Error list". Also,after installing when I go to Excel options on the client machine, and try to check the entry for my add in, it says "runtime error occured while trying to load addin"

# Office Development with Visual Studio said on October 2, 2008 12:21 PM:

In Deploying an Office solution using Windows Installer , you saw how to deploy Office 2007 solutions

# Office Development with Visual Studio said on October 2, 2008 12:26 PM:

In Deploying an Office solution using Windows Installer , you read how to deploy document-level Office

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

About VSTO Team

This login represents the Visual Studio Tools for Office team. Many members of the team us this account for publishing technical blog posts.

This Blog

Syndication

Page view tracker