Deploying an Office solution using Windows Installer (Mary Lee)

  • Comments 7

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.

Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post
  • While the default mechanism for deploying VSTO v3 Add-Ins is ClickOnce, there there's now also a documented

  • 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"

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

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

  • I am creating a excel application using vsto 2008 + excel 2003.

    I m going to  publish output of my  solution.

    But when i tried to open this Excel workbook, i m getting a error

    Office document customization is not avilable.

    The Customization assembly could not be found or could not be loaded.you can still edit & save the document.Contact your administrator or author of this document for further assiatance.

    Can any one guide me how can i resolve this issue?

    Thanks & Regards,

    Gaurav Jain

  • Gaurav,

    It sounds like you are using ClickOnce to deploy your Office solution, but this blog entry is about Windows Installer.

    For assistance, please post your question in the VSTO forum at social.msdn.microsoft.com/.../threads

    m.

  • How can you create and launch an application using the visual basic capability of Microsoft Office 2007. I've tried and created a form that interacts in some limited ways. But I want to know how to go the extra limit. Any suggestions will be welcomed.

Page 1 of 1 (7 items)

Deploying an Office solution using Windows Installer (Mary Lee)