At the office, we use an Outlook addin (that I originally developed in Visual Studio 2002 targeting the 1.0 .NET Framework). Finding that technology to be a little obsolete (all of our others internal applications are on the 2.0 Framework), we’ve decided to migrate it to 2.0 and add some news features while we’re at it.
The migration and installation went fine at first on my Vista development PC but I couldn’t get the addin to load on the users computers (that are on WinXP). Every thing I tried, didn’t work and the addin couldn’t load at all. What I ended up doing is a complete rebuild of the application using VSTO SE (Visual Studio Tools for Office Second Edition). Since everything works well now, I’ll share with you every resource that I came across about creating an addin with VSTO.
1. Get the prerequisites:
In order to deploy a VSTO addin, you need the following prerequisites installed on every user’s computer:
2. Code the addin:
Pretty straightforward step, depending on your company’s requirements. I’ll write another article about that part soon with some code examples.
3. Prepare for deployment:
In order to prepare for the deployment of your solution, you need to set the code access security policy for your assemblies. To do so, you need to do the following tasks:
In the custom action data for the Install custom action, you need to enter the following data, replacing “OutlookAddin” with the name of your addin:
/assemblyName="OutlookAddin.dll" /targetDir="[TARGETDIR]\" /solutionCodeGroupName="MyCompany.OutlookAddin" /solutionCodeGroupDescription="Code group for OutlookAddin" /assemblyCodeGroupName="OutlookAddin" /assemblyCodeGroupDescription="Code group for OutlookAddin" /allUsers=[ALLUSERS]
For the Rollback and Uninstall, all you need to provide in the custom action data is:
That’s a wrapper of about everything useful I found in my research. I hope this helps you! If there is something you think would be a good addition to this article, feel free to email me at: stan AT stanbiron DOT com.
Some more useful resources: