NLua - System DLL Not Found Exception

887 Views Asked by At

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.

0

There are 0 best solutions below