Question

I'm developing addin compatible with 2003,2007,2010 and 2013 MS Word versions and XP(not crittical), Vista, Windows 7.
Important note - I'm working with free SharpDevelop IDE, target framework is 4.0.

  1. First of all, I should find installer for relevant version of intertop assemblies and provide it to client. In order to download only one version I have to download the oldest version of PIA. Here I read that PIA for XP works for any MS word version and for any of XP,Vista and Windows 7. Is it true?
  2. This answer talks about implemeting Extensibility interface. I found extensibility GAC reference in SharpDevelop and it's ok. But should I give extensibility.dll to client or it exist on any PC with .NET framework?
  3. What version of Microsoft Object Library is compatible with every OS/Word combination? 2003's 11.0? Is it necessary? Now I'm using office.dll GAC reference without adding object library and it works. But I can't even build project using both office.dll and object library. Doest it mean I can provide to client office.dll and forgot about object library and problems related to compability?
  4. Question about RegAsm.exe. If I compiled project under 4.0 .NET Framework and set target Framework 3.5 what version of RegAsm I should use? Development version or target version?

Oh, i forgot the main question)) After solving compability problems how create setup.exe which automatically installs .NET Framework, Intertop Assemblies and automatically registers addin? Right now I'm doing registration manually - create LoadBehavior,Description,FriendlyName variables in regisrty, call RegAsm - how do it inside installer?

Was it helpful?

Solution

I owe you respect for the work you have undertaken to do all this manually and without the help of Visual Studio. I'm developing also add-ins targeting multiple office versions, but I always use Visual Studio Professional together with the Add-in Express rapid development tool, which covers all of the questions / steps you're asking for. You may get plenty of free information on their website.

Please be aware that creating an installer program working in all the situations you have named can be a very difficult job. Don't forget that in the case of a professional software you must test your deployment on nearly each configuration you're expecting.

ad 1) As for an installer, look for WIX tools which are free. Otherwise you can buy any installer program you like and learn how to deploy. - As for the PIAs, installation can only be done be administrators, so be aware of this.

ad 2) You must deploy the extensibility.dll to your clients.

ad 3) You must use the oldest PIA for all versions, because it is the only one the oldest office version (e.g. Office 2003) can understand. All Office PIAs are compatible upwards. Attention of course you cannot use methods or properties which have been introduced in newer versions.

ad 4) I don't think that there's a difference between the two versions of regasm.exe.

ad Main Question) I cannot explain here HOW TO DEPLOY AN OFFICE ADD-IN. You need some basic knowledge about the Windows Installer technology first. But you're on the right way. However, "Installation of the .net framework" I would leave as a prerequisite to the administrator, because it may require reboots. Additionally, a lot of people have got grey hair pulling the right version of the .net framework in their setup program (say, it is running on a Windows 7 English US with Multilanguage Pack in Dutch running a Dutch Microsoft Office 2010: which framework your setup should install?)

The same for the PIAs: You can just check through custom actions in the installer for the existence of the Office PIAs and cancel the install, if they are not available.

As for the registry keys, normally this is done exactly as you're said: writing to the registry during the setup; and this is done normally by custom actions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top