Trying to create a set of perceptual hashing nodes in VL using DupImageLib. I downloaded the dependency with VL’s cmd line (nuget package is here)
Unfortunately, when I try to create a CalculateAverageHash64 node, VL will complain it cannot find Magick.NET-Q8-x64.Native.dll. Then I did the following :
I checked in b37/lib/packs/Magick.NET.Core-Q8.Native, the dll is indeed present but it is in some nested folder structure (/runtimes/win7-x64/native)
So I tried to create a small console app in Visual Studio, it was throwing the same error but I noticed that the dll was not present in the build folder. So I copy and pasted it from vvvv’s lib folder and then my console app was working. Weird thing is that in VS’ nuget manager, the dependency is marked as installed but does not show up in the solution explorer.
What is wrong with this package ? Why does VL and VS seem to have trouble using it ?
there is no official way for packing native dlls into a nuget. every nuget package seems to have it’s own idea how that should work. we noticed this several times now. so basically you need to make sure that the search path for native libs contains the folder of your native lib. most simple way is to place it besides vvvv.exe, second approch is to temporarily add the folder that contains the native lib to the search paths via command line.
hei @joreg, thanks for that precision. I’m not sure I get the batch file thingy. I’ve created a .bat with the structure specified in the graybook (with full path to vvvv.exe), started it and relaunched vvvv but nothing changed. What is that supposed to do ? Should it add the path of the dll to my env vars ?
so the SET PATH in the .bat file makes sure to add the path to the unmanaged files to the processes search path before vvvv.exe is launched. you can check if that worked by using the GetEnvironmentVariable (Windows) node in vvvv. the value for the PATH variable should have the path added at the end. then vl will find the files without you having to move them around.