【发布时间】:2011-02-05 05:04:21
【问题描述】:
我的安装解决方案具有安装程序项目(不是 Web 安装程序,而是简单的安装程序),它借助我自己的代码执行我的安装步骤的另外两个 dll 项目来安装 NT 服务、Web 服务和网站。在安装程序项目的用户操作中,我调用其中一个项目的安装程序功能,并且该项目调用第二个项目的安装程序:安装程序 -> MiddleCaller -> InstallationCore。
所有这些都是在 Windows 7 上开发的,当我全部编译为 32 位时工作正常。
项目必须在 Windows 2008 上运行。由于某些原因,所有项目都必须是 x64 位。
为此,在 MiddleCaller 和 InstallationCore 中,我在项目上单击鼠标右键 -> 构建 -> 目标 x64。为了在安装程序的属性中将安装程序项目移动到 64 位(当项目处于活动状态时),我检查:目标平台:x64。
当我在 x86 上运行安装时出现错误:
The installation package is not supported by this processor type"
这很好,因为现在我知道我的安装是用 64 位编译的,但是当我在 windows 2008 上运行它时,我得到:
Error 1001. Exception occured while initializing the instance:
System.BadImageFormatException: could not load file or Assembly
'MiddleCaller, v...' or one of its dependencies. An attempt was
made to load a program with an incorrect format.
有人知道我需要做什么才能在 x64 上正常安装吗?
可能我还没有将安装程序项目移动到 x64 位,如果是,我在哪里执行此操作?
谢谢你的到来。
【问题讨论】:
标签: visual-studio windows-7 installation windows-server-2008 64-bit