To read previously blogposts on the subject please see:
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:
- Deploying VSTO 2005 Solutions Using Windows Installer (Part 1 of 2)
- Deploying VSTO 2005 Office Solutions Using Windows Installer (Part 2 of 2)
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.