0

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?

Community
  • 1
  • 1

1 Answers1

2

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.

domke consulting
  • 1,022
  • 8
  • 5
  • Could you please elaborate about providing dlls to clients? Should I also provide office.dll? What about intertop dll? I personally think, that providing intertop dll is not necessary because installation of PIA means copying it to client machine. Does PIA installation mean copying office.dll to client's PC or I have to copy it manually like extensibility.dll? –  Mar 05 '14 at 04:44
  • You should not bring yourself in a situation in which you try to assure that Office is correctly installed. Only with Office 2003 the installation of the PIAs was optional. Newer setups of Microsoft Office have the checkbox checked. And usually the PIAs are in the GAC. However, if you program against the oldest version, you would add local references to them in your add-in. Since you're working with net 4.0, you could embed the interops so that you do not need to deploy them. – domke consulting Mar 05 '14 at 08:31
  • "you could embed the interops" - how I can do it? –  Mar 05 '14 at 09:04
  • If you highlight a reference and right-click and look at the properties, you have the property "Embed interop types", which can be set to true or false. If true, the interop types are embedded into you add-in dll. – domke consulting Mar 05 '14 at 10:26
  • Thanks, I'll try to do it. But extensibility.dll still need to be copied manually, am I right? –  Mar 05 '14 at 10:29
  • Yes, because this file is probably not on the target system, while the Office dlls should be already there. – domke consulting Mar 05 '14 at 10:38