I followed this tutorial on using external libraries in Godot and did manage to get it to work with the Newtonsoft.Json package the guy used in the video. The tutorial tells you to just reference the .dll in the .csproj file like this:

<Reference Include="Newtonsoft.Json">
      <HintPath>$(ProjectDir)\lib\Newtonsoft.Json.dll</HintPath>
      <Private>False</Private>
</Reference>

I then tried the same thing with this package for the Kinect. I can have the line using Microsoft.Kinect; in my scripts without errors and autocomplete is working, but as soon as I actually mention anything from this sdk in the class, such as private KinectSensor sensor = null;, I get these errors when building the game: I do have the kinect sdk installed and that's working fine. I also read through the documentation on binding external libraries, but couldn't figure out how to get a static library from the .dll file that I got from NuGet.

It looks like your post got stuck in the moderation queue. Make sure that you have verified your email address.

Update: I moved the variable declaration that requires the Kinect library into the ready method like this:

public override void _Ready()
{
    KinectSensor sensor = KinectSensor.GetDefault();
}

Now I am getting this error: E 0:00:00.612 debug_send_unhandled_exception_error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Kinect, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. While this is a lot less cryptic then the previous two, It still doesn't tell me why the library can't be loaded.

3 years later