运行C#程序时出现System.BadImageFormatException

byn*_*eri 2 .net c#

我正在Windows 7上编译VS 2010上的C#程序,然后在另一台32位机器上运行文件(全部来自构建的bin\Debug目录).

Debug目录中的文件还包含此程序所依赖的Microsoft.Office.Project.Server.Library.dll文件.

在VS 2010项目的构建配置中,平台设置为x86.然而,在32位机器上,它会导致System.BadImageFormatException.

Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 
'Microsoft.Office.Project.Server.Library, Version=12.0.0.0, Culture=neutral, 
PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The module was expected to 
contain an assembly manifest. File name: 'Microsoft.Office.Project.Server.Library, 
Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
Run Code Online (Sandbox Code Playgroud)

这可能是什么原因?

McK*_*Kay 6

我仍然认为它是x86 v x64问题.可执行文件是否依赖于其他x64库?