尝试使用LuaInterface时发生了BadImageFormatException错误。

我将 LuaInterface 导入控制台项目中,引用了它并编写了一个小的测试脚本。但是当我运行它时,出现了以下提示:

无法加载文件或程序集 'LuaInterface, Version=2.0.0.16708, Culture=neutral, PublicKeyToken=null' 或它的某一个依赖项。尝试加载格式不正确的程序。

请原谅我是新手,但我想不出它是什么意思。我应该怎么做?

原文链接 https://stackoverflow.com/questions/1340265

点赞
stackoverflow用户8799
stackoverflow用户8799

你正在使用64位操作系统吗?

如果是的话,你需要获取一个x64版本的LuaInterface或者将你的控制台项目的平台目标设置为x86。

Build properties screenshot

你可以在这里了解平台目标选项: http://visualstudiohacks.com/articles/visual-studio-net-platform-target-explained/

2009-08-27 11:05:11