windows-installervstooffice-addinsexcel-addinscomaddin

Windows Installer Setup Project does not accept output from VSTO Excel add-in project due to supposed architecture mismatch


I am migrating an old Excel add-in from 32 to 64 bits. Orignal source code was lost so I need to repackage VBA files from an old MSI cabinet. I want to build a package (MSI) that contains:

I have configured a Windows Installer Setup Project to package output from the Add-in. enter image description here enter image description here

Problem is that I keep getting this error:

ERROR: File 'VSTOAddIn.dll' of project output 'Primary output from VSTOAddIn (Active)' targeting 'AMD64' is not compatible with the project's target platform 'x86'.

I have set any drop down with architecture I found in both project configuration to "x64". In the build manager it seems like the Installer Setup Project is architecure agnostic: enter image description here

Am I missing somthing or my approach is wrong alltogether?


Solution

  • 64-bit versions of Office will use the 64-bit registry hive to look for Add-ins. To register Add-ins under the 64-bit registry hive, the setup project's target platform must be set to 64-bit only.

    1. Select the Office add-in setup project in solution explorer.
    2. Go to Properties window and set TargetPlatform property to x64.

    MSI setup for Office add-ins

    Installing an add-in for both 32-bit and 64-bit versions of Office, will require you to create two separate MSI packages. One for 32-bit and one for 64-bit.

    Read more about creating MSI installers for Office COM/VSTO add-ins in the Deploying a VSTO Solution Using Windows Installer article.