我将 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.
请原谅我是新手什么的,但我不明白它是什么意思。我该怎么办?
最佳答案
您运行的是 64 位操作系统吗?
如果是,则需要获取 LuaInterface 的 x64 版本或将控制台项目的平台目标设置为 x86。
您可以在此处阅读平台目标选项: http://visualstudiohacks.com/articles/visual-studio-net-platform-target-explained/
关于c# - 尝试使用 LuaInterface 时出现 BadImageFormatException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1340265/