尝试使用LuaInterface时出现BadImageFormatException

时间:2009-08-27 10:45:12

标签: c# visual-studio-2008 .net-3.5 dll lua

我将LuaInterface导入控制台项目,引用它,并编写了一个小测试脚本。当我运行它时,我明白了:

Could not load file or assembly 'LuaInterface, Version=2.0.0.16708, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

原谅我是一个新手或者其他什么,但我无法弄清楚它意味着什么。我该怎么办?

1 个答案:

答案 0 :(得分:8)

您是在64位操作系统上运行吗?

如果您是,那么您将需要获得LuaInterface的x64版本或将控制台项目的平台目标设置为x86。

Build properties screenshot

您可以在此处阅读平台目标选项: http://visualstudiohacks.com/articles/visual-studio-net-platform-target-explained/

相关问题