Issue: Prerequisites Packages are not available for the Office Add-in Setup Project developed using Visual Studio
We need to add Prerequisites Packages to Office Add-in Setup Project developed using Visual Studio; so that out Add-in works as expected when we deploy it on other machines.
In case any of pre-requisite packages are not available/listed under Add Prerequisites dialog box(shown below) then we can include user-provided prerequisite packages because Prerequisites dialog box is extensible.
Here's how we can do it.
First download the required redistributable prerequisite package from the links below or get it from Microsoft Download Center
And then use Bootstrapper Manifest Generator available @ https://code.msdn.microsoft.com/bmg to add bootstrapper package manifest so that the package would appear in the Prerequisites dialog shown above.
Also make sure that we select the "Download prerequisites from the same location as my application" option.
Here is the list of few of common redistributable Pre-requisite packages for Office Add-ins:
Office PIAs depending on version of Office we are targeting:
- Office 2003 Update: Redistributable Primary Interop Assemblies
The Office 2003 Primary Interop Assemblies (PIA) redistributable is a Microsoft Windows Installer package that contains the Primary Interop Assemblies for Microsoft Office 2003 products. - 2007 Microsoft Office System Update: Redistributable Primary Interop Assemblies
The 2007 Microsoft Office system Primary Interop Assemblies (PIA) redistributable is a Microsoft Windows Installer package that contains the Primary Interop Assemblies for 2007 Microsoft Office system products. - Office XP Primary Interop Assemblies (PIAs)
Download the Office XP PIAs and use them to develop Office XP solutions with Visual Studio .NET.
.Net Framework for which we have targeted the Add-in:
- .NET Framework 3.5
Microsoft .NET Framework 3.5 contains many new features building incrementally upon .NET Framework 2.0 and 3.0, and includes .NET Framework 2.0 service pack 1 and .NET Framework 3.0 service pack 1. - .NET Framework 3.5 Service pack 1
Microsoft .NET Framework 3.5 Service Pack 1 is a full cumulative update that contains many new features building incrementally upon .NET Framework 2.0, 3.0, 3.5, and includes cumulative servicing updates to the .NET Framework 2.0 and .NET Framework 3.0 subcomponents. - .NET Framework Version 2.0 Redistributable Package (x86)
The Microsoft .NET Framework version 2.0 (x86) redistributable package installs the .NET Framework runtime and associated files required to run applications developed to target the .NET Framework v2.0. - .NET Framework Version 1.1 Redistributable Package
The .NET Framework version 1.1 redistributable package includes everything you need to run applications developed using the .NET Framework.
VSTO Runtime depending on the version of VSTO used for Add-in developed:
- VSTO 2005 Runtime (x86)
The Microsoft Visual Studio 2005 Tools for Office (VSTO 2005) redistributable package installs the Visual Studio Tools for Office runtime, which is required to run solutions built using VSTO 2005. - Microsoft Visual Studio 2005 Tools for Office Second Edition Runtime (VSTO 2005 SE) (x86)
The Microsoft Visual Studio 2005 Tools for Office Second Edition (VSTO 2005 SE) redistributable package installs the Visual Studio Tools for Office runtime, which is required to run solutions built using VSTO 2005 or VSTO 2005 SE. - Microsoft Visual Studio 2005 Tools for Office Second Edition Runtime (build 8.0.50727.940) (x86)
The Microsoft Visual Studio 2005 Tools for Office Second Edition (VSTO 2005 SE) redistributable package installs the Visual Studio Tools for Office runtime, which is required to run solutions built using VSTO 2005 or VSTO 2005 SE. - Microsoft Visual Studio 2005 Tools for Office Second Edition Runtime (build 8.0.50272.891) (x86)
The Microsoft Visual Studio 2005 Tools for Office Second Edition (VSTO 2005 SE) redistributable package installs the Visual Studio Tools for Office runtime, which is required to run solutions built using VSTO 2005 or VSTO 2005 SE. - Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime) (x86)
This download (VSTOR30.exe) installs the Visual Studio Tools for the Office system 3.0 Runtime, which is required to run VSTO solutions for the 2007 Microsoft Office system built using Microsoft Visual Studio 2008. - Microsoft Visual Studio Tools for the Microsoft Office System (version 3.0 Runtime) Service Pack 1 (x86)
This update is required to develop or run solutions for the 2007 Microsoft Office system that are built using Microsoft Visual Studio 2008 Service Pack 1 (SP1).
Fixes
- FIX: Add-ins, smart documents, or smart tags that you create by using Microsoft Visual Studio 2005 do not run in Office
https://support.microsoft.com/kb/908002
If you are using Visual Studio 2008 then you have to follow the Workaround mentioned below to get KB908002 listed under add pre-requisites dialog:
1. Download and install the fix on a machine which has Visual Studio 2005 installed.
2. Navigate to *C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages*, locate KB908002 folder.
3. Log on to the machine which has Visual Studio 2008 installed and copy KB908002 folder to *C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages*
4. Now, if you go to pre-requisites list on Visual Studio 2008 machine you would see the fix listed.
References:
https://msdn.microsoft.com/en-us/magazine/cc163899.aspx
Comments
- Anonymous
November 28, 2008
PingBack from http://blog.a-foton.ru/index.php/2008/11/28/issue-prerequisites-packages-are-not-available-for-the-office-add-in-setup-project-developed-using-visual-studio/