views:

78

answers:

1

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:

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?

A: 

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.

Roel van Uden
I tried that, However the Lua 5.1.2 project has build errors, so I can't rebuild that to target .net4
Martin
I'm guessing you are using Visual Studio 2010 which needs a few type casts before it compiles correctly. LuaInterface has no issues though but it depends on Lua binary to be compiled correctly. It shouldn't be too hard to do.
Roel van Uden
Right, I'll have to give that a go. I'm not terribly familiar with C++, but I should be able to manage a few type casts ;)
Martin