0

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:

  • Updated Excel files from the old plugin (XLAM, XLA and some others)
  • New VSTO Excell add-in that will load the VBA modules to Excell on startup.

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?

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
Jarosław Jaryszew
  • 1,414
  • 1
  • 12
  • 13

1 Answers1

1

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.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Thanks. In VS 2019 and 2022 you get different "properties" from context menu in solution view from the ones you get by pressing alt-enter. That got me confused. – Jarosław Jaryszew Mar 10 '23 at 08:29