VSTO & .NET & Excel

January 29, 2007

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part V

Filed under: VSTO & Excel — Dennis M Wallentin @ 11:28 am

To read previously blogposts on the subject please see:

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part I

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part II  

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part III  

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part IV 

In order to run VSTO created managed COM add-ins there are certain requirements, in terms of prequisites components, that need to be met. The basic components are the following:

  • .NET Framework
  • VSTO Runtime
  • Office 2003 and / or 2007 PIA
  • For Office 2003 SP-1 and later

It can be discussed whether all the prerequisites components, when missing on the targeting computers, should be part of the VSTO solution’s MSI (Microsoft Installer) file or not.  The installation process starts to check if the target computer contains the prerequisites or not. If not, then the missing components are first installed and then as a final stage of the process the VSTO solution is installed.

Installing all the required components involves several installation steps and if anything goes wrong then it can be difficult to track down the error(s) and also to rollback the installation process, i e to restore the computer to its previously state.  The alternative approaches we have to choose among are:

  • Install all the required components as standalone installations and separated from the installation of the VSTO managed COM add-in.
  • Install some of the components, VSTO and PIA, together with the VSTO solution and install .NET Framework as a standalone.
  • Install all the required components together with the VSTO solution.

The less we know about the client and their targeting computers enviroment the more important it is to know what are already installed and not. Microsoft has a good tool that gives us a documentation over the present status, Microsoft PSS VSTO 2005 Client TroubleShooter (not yet available for Office 2007). The outcome of using this tool will guide us to some extend which alternative to choose from the above list.

What if we don’t know anything or very little about the targeting enviroment? If we have good knowledge and are skilled in creating “bullet proof” MSI-packages then we can include all prerequisites components and roll it out. If not, then it may be better to ask the client to first install the necessary components and then install the VSTO solution. It may not be the optimal situation but at least it gives a workable solution.

No matter of approache we use it’s very important that the same version of .NET Framework and VSTO Runtime are installed. (One good approach is to create a folder with a name like “Prequisites 2.0” and store the relevant components in it.)

When viewing the default list of prerequisites the items VSTO, PIA and SP are not among the available items. How can we add the wanted prerequisites components to the list,  i e how to create and add our own customized bootstrappers? 

When taking part of the two articles from Microsoft on VSTO deployment (see below) these sources assume that this kind of preparation has already been taken care of… 

This can be done manually but it requires knowledge about XML and also how to work with the Windows Registry. However, I recently discovered an excellent tool that create and add bootstrappers in a very user friendly way (which I also highly recommend):

It also handle own created prerequisites component in a similar way.

The following picture is from my developing machine and shows the added customized bootstrappers:


I prefer to have the components under “own control” and therefore chooses the above location for them (see picture).

The articles from Microsoft:

In addition to the prerequisites basic components above we may also consider to include the fix – KB908002 – also for VSTO solutions. It’s still necessary for managed COM Add-ins targeting Office 2007.

In the next post I will discuss security and after that the final deployment process.

Kind regards,



  1. Holy smokes, Dennis, that’s a lot to digest…

    I’ve skimmed the “Deploying VSTO 2005 Solutions Using Windows Installer” article before, but I’ll clearly have to give that another read. The boostrapper manifest generator (and related articles you listed) look execellent. I will definately have to give that a read.

    Responding to Ken Puls in a prevoius post, I’m in the same boat that you are Ken: I’m developing but ignoring deployment issues. I’m hoping that by the time I’m ready to deploy that MSFT will have made it easier by then… Or that Dennis will have it figured out! 😀

    Thanks so much Dennis, you’re making an enormoust contribution here.

    Comment by Mike Rosenblum — February 2, 2007 @ 3:16 pm

  2. Mike,

    Thanks for Your kind comments.

    There is no “magic” only pieces of information that need to put together 😉

    I find it remarkable that MSFT don’t mention the Manifest Generator. It saves probably a number of hours, especially for VBA-developers who are not familiar with manifests or don’t want to do the plumbing.

    Kind regards,

    Comment by Dennis Wallentin — February 2, 2007 @ 3:59 pm

  3. Dennis
    Well done for keeping up the good work, I share the others disappointment at the deployment burden, and their and your hope this gets sorted in V3.
    I also appreciate what you are doing here, I had a good look at this back in VS2003 and walked away because it was too frustrating, and the info so hard to come by.
    I’m looking forward to your VSTO book reviews.

    Comment by Simon — February 8, 2007 @ 5:16 am

  4. Hi

    How should i create a set up that support MS SMS (Microsoft Systems Management Server) for silent installations .


    Comment by Anil — December 1, 2008 @ 2:25 pm

  5. Hi Anil,

    Unfortunately I have no knowledge about MS SMS.

    Kind regards,

    Comment by Dennis Wallentin — December 1, 2008 @ 5:01 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: