在 .net4 中加载 LuaInterface [英] Loading LuaInterface in .net4

查看:37
本文介绍了在 .net4 中加载 LuaInterface的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在处理的 C# 应用程序,我想使用出色的 LuaInterface.但是,当我运行应用程序时,当我尝试使用 LuaInterface 执行某些操作时出现此异常:

I have a C# application I'm working on with which I want to use the excellent LuaInterface. However when I run the application I get this exception when I try to do something with LuaInterface:

混合模式程序集是针对运行时的v2.0.50727"版本并且不能在 4.0 中加载运行时无需额外配置信息.

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

我可以提供哪些额外的配置信息来正确加载?

What additional configuration information can I give to make this load properly?

推荐答案

您正在使用 LuaInterface 的预编译版本,该版本是针对 2.0 版本的框架构建的,或者没有更改 LuaInterface 项目中的构建设置.将目标框架更改为与构建应用程序相同的版本并自己构建库.您的问题将通过这种方式得到解决.

You're using the pre-compiled version of LuaInterface which was built against the 2.0 version of the framework or didn't change the build settings in the LuaInterface project. Change the target framework to the same version as you're building your application and build the library yourself. Your problem will be solved this way.

这篇关于在 .net4 中加载 LuaInterface的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆