Hello, I struggled with some difficulties in understanding the deployment of Primary Interop Assemblies (PIA) for MS Office. I have a Visual Studio Com Add-IN built into VS 2008 using pure com technology (rather than VSTO, see the bottom of this for more details) that references 2003 Primary Interop Assemblies, but the add-in can be used in 2003, 2007 or currently 2010 Office machines. Since I never know if the client will use 2003, 2007 or 2010, I cannot just deploy one version of the PIA as a precondition (unless I make 3 installers that I do not want to do). Now I understand that when you follow the steps here , add PIA 2003 and 2007 to the list of prerequisites that are displayed in Visual Studio (2008), the prerequisites are smart enough to determine which version of Office is running on the client you are targeting . Therefore, if you were to choose the 2003 primary assemblies and the 2007 iterop primary assemblies, since both are prerequisites, then when this installation is installed on the machine since 2003, it should be smart enough to only try to add PIA 2003 if they are not present on this computer and if it is an Office 2007 machine, then it will install only PIA 2007 (and not try to install 2003 PIA).
Question 1 is the correct understanding (that the preset packages are so smart as to install only what it needs based on the version of Office?)
Question 2 Is there a way to get the 2010 PIA to be shown on the prerequisite list in VS 2008, as in 2003 and 2007? I do not want to update this project to VS 2010 b / c, it is considered an outdated application, now it is used by many clients from around the world.
Question 3 Although the actual assembly refers to the primary interops 2003, I do not currently deploy these interops with the add-in at the installation location. Instead, I assume that if I can install the correct PIA, then I do not need this present in the installation path, since the PIA will be in the GAC. However, one of the possible approaches could simply be to include the 2003 collections that are referenced (in my case, excel and word) on the installation path, and not worry about the PIA. I suspect that this will work on 2003 machines, but maybe not on b / c machines in 2007 and 2010 on the latter, even if the 2003 mentioned intermediate messages are detected at run time on the installation path of the assembly, I think that if Since there is no Policy.11.0.Microsoft.Office.Interop.Excel / Word (etc.) in the GAC, then 2007 and 2010 will most likely not know what to do with 11.0 (2003) interops (as I think, Policy.11.0.Microsoft. Office.Interop redirects 2003 forwarding requests to 2007 or 2010). Any thoughts on this?
Question 4: There is a bug with Office 2.0 applications Office 2.0 and Office 2003, over which the add-in does not load. This has been reviewed by KB907417 as well as KB908002. Does anyone know if this KB is needed if you are developing a framework of 3.0 or 3.5 (and making assumptions of 3.0 or 3.5), since this problem was specific to framework 2.0? Or does KB still need to deploy b / c to his office 2003, which is a problem, not a version of the framework?
As you can tell from my 3 questions, Iβm trying to figure out whether it is possible to build one installer using the VS configuration utility. If PIAs can be performed with one installer, but the KB above is an obstacle (as it may be, the answer will return that even on the 3.0 or 3.5 infrastructure of 2003 clients will need KB), then perhaps the path to one installer should just make KB - a precondition for all sections and install it on machines of 2007 or 2010, although they are not technically needed. Any thoughts on this option would also be appreciated. Finally, I know that writing the Com Add-IN command for excel or word is now usually done with VSTO instead of pure managed-structure code, but now it is not an option to change an outdated application in this direction. It is also reported that now the 4.0 framework can be used to deploy add-ons without any PIA prerequisites, but again, this is not a viable option right now.