0

Having a serious complication with trying to use Lua in VB.NET. My question is How do I get this Library to load properly so that it is actually usable.

Here are my attempts.

  1. I tried several variations of the Lua library via NuGet. And after some research, I found LuaInterface (not available in NuGet, and the official repo references NLua as it's successor).

  2. Started a baby fresh project, referencing only NLua from NuGet. -- fails

  3. Added reference to Lua from NuGet -- still fails
  4. Started a fresh project, and downloaded the current binaries directly from github for NLua --- fails.

In all of the above cases, I checked the build folder to ensure that all DLL's existed (as Visual Studio still doesn't deploy all dll's all the time -- see SQLite library for example of this).

The error I am at now is this

A first chance exception of type 'System.DllNotFoundException' occurred in KeraLua.dll

Now the BIG problem comes when I explicitly declare a reference to this file, as it creates a conflict since KeraLua.dll, and NLua.dll BOTH have a "Lua" method with identical parameters.

The code I am using where it crashes is pretty simple:

Imports NLua

Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim l As New Lua


    End Sub
End Class

If someone could shed some light on why this library is failing so hard or what I may be doing wrong, it would be much appreciated. I am currently trying to use this library to expose a table written in Lua inside a .net environment. I have seen the examples on this on here, and they are dated as they reference the LuaInterface object which is deprecated.

Kraang Prime
  • 9,981
  • 10
  • 58
  • 124
  • 1
    Sanuel, do you know if is working using C#? KeraLua uses the native Lua52.dll (and you will need the vcredist 2013 installed to run the Lua52.dll). – Vinicius Jarina Jan 01 '15 at 20:12
  • I was able to get it to partially work using the "Pure C#" download, however when it has an exception, it just burps and terminates the process without any error. I am able to work around it, but it is still a pain in the butt to try and traverse a table structure. Examples do not work, as I must call the value via the integer location, and if the result is another table, there doesn't seem to be a way to go up further, even creating a var of the type LuaTable causes an exception so forced to use "Object" – Kraang Prime Jan 02 '15 at 19:28

0 Answers0