我正在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'
这是什么原因呢?