gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 21:51:51 24 4
gpt4 key购买 nike

我正在 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'

这是什么原因?

最佳答案

我仍然认为这是 x86 与 x64 的问题。可执行文件是否依赖于其他 x64 库?

关于c# - 运行 C# 程序时出现 System.BadImageFormatException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8735467/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com