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

prereq

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:

.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:

Fixes

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