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
- Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part V
- Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part VI
MSFT has recently updated their articles about deployment of VSTO solutions:
It’s good that the articles have been updated to review Office 2007 and VSTO 2005 SE. In my opinion it would have been even better if they had included the difficulties and shortcomings that actually do exist (see MSDN’s VSTO forum).
When it comes to deployment of managed VSTO created COM add-ins we have two alternatives to consider. The add-ins can be stored on the local hard disks or in network-accessible locations (although the later require some additional work).
If we develop general free and commercial add-ins the only option is to install them on the targeting computer’s disks. For custom specific solutions network-accessible locations in the intranet can be considered.
In the following we will create the deployment package for the VSTO project. The first decision we need to make is about the prerequisites and where these should be available. I prefer to make them available as:
- Part of the deployment package or
- Downloadable from a web location controlled by me.
The above assures that the correct versions of the prerequisites are always available for my add-ins. In addition, the PIAs can’t be downloaded and installed from a web location. As for the VSTO project in the series the prerequisites would be part of the deployment package.
Next we need to work with the Setup project itself. This is easy as the Setup project was created and added to the VSTO project when we created it. What we need to do in order to create the release version of the add-in is the following:
- Right click on Setup project and select the menu item ‘Properties’.
- In the dialog form click on the button ‘Configuration Manager’.
- In the field for ‘Active solution configuration’ select the ‘Release’ option.
- Close the dialogform.
- Right click on the Setup project and select the menu item ‘Build’.
After these steps we have a deployment package to distribute that includes the following:
As we can see from this screenshot we have both an exe file as well as a msi file. When executing the setup.exe file everything works as expected and if the prerequisites don’t exist on the targeting computers they will be installed first and then the add-in.
If we execute the msi file the solution will be installed but it will not check if the prerequisites exist or not on the targeting machines. That’s why the above mentioned MSFT’s articles discuss launch conditions when msi files are being executed. On the other hand, in a 100 % controlled environment msi files are preferred to use.
Q: Are there any other aspects to consider before we start to distribute the installation package?
Windows Vista & Error 2869
Believe or not but it exist a major issue when it comes to Windows Vista and installing VSTO solutions – The Error 2869:
I have spent considerable time to figure out how to solve it as I initially thought it was related to my VSTO setups. It finally turned out to be related to VSTO and Windows Vista.
Instead of discuss it more in detail here I refer to the following sources:
Instead of downloading the whole Windows SDK kit the necessary file can be downloaded here.
If You experience this problem then see if it can be resolved by downloading and installing the Visual Studio 2005 SP-1 Update for Vista. In the next release of Visual Studio.NET this issue will be solved.
This series has been trying to give more information on using the latest technology – VSTO – to create and distribute managed COM add-ins.
Being an early adopter comes with a price in terms of:
- Heavy time consumption with no or little outcome
- Lack of relevant and updated documentation
Q: Is VSTO created COM add-ins ready for production?
A: In a 100 % controlled environment where the add-ins leverages the core and workable part of VSTO then the answer is ‘yes’. For other scenarios the answer will still be ‘no’.
But it should not prevent us from explore and discuss VSTO!