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

huangapple go评论46阅读模式
英文:

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

问题

我正在将一个旧的Excel插件从32位迁移到64位。原始源代码已丢失,所以我需要重新打包来自旧MSI安装包的VBA文件。我想要构建一个包含以下内容的安装包(MSI):

  • 来自旧插件的更新的Excel文件(XLAM、XLA以及其他一些文件)
  • 新的VSTO Excel插件,将在启动时加载VBA模块到Excel中。

我已经配置了一个Windows安装程序设置项目,以将插件的输出打包。问题是我一直收到以下错误:

ERROR: 项目输出的文件 'VSTOAddIn.dll',目标为 'AMD64',与项目的目标平台 'x86' 不兼容。

我已经在项目配置中找到的所有架构下拉菜单中将它们都设置为“x64”。在构建管理器中,似乎安装程序设置项目是架构无关的:

我是不是漏掉了什么,还是我的方法完全错误?

英文:

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. Windows Installer Setup Project does not accept output from VSTO Excel add-in project due to supposed architecture mismatch
Windows Installer Setup Project does not accept output from VSTO Excel add-in project due to supposed architecture mismatch

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:
Windows Installer Setup Project does not accept output from VSTO Excel add-in project due to supposed architecture mismatch

Am I missing somthing or my approach is wrong alltogether?

答案1

得分: 1

64位版本的Office将使用64位注册表项来查找加载项。要在64位注册表项下注册加载项,设置项目的目标平台必须设置为64位。

  1. 在解决方案资源管理器中选择Office加载项安装项目。
  2. 转到属性窗口并将TargetPlatform属性设置为x64

为32位和64位Office安装加载项,需要创建两个单独的MSI包。一个用于32位,另一个用于64位。

了解有关为Office COM/VSTO加载项创建MSI安装程序的更多信息,请参阅使用Windows安装程序部署VSTO解决方案文章。

英文:

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.

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

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.

huangapple
  • 本文由 发表于 2023年3月9日 18:12:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/75683157.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定