Fail to load .dll in grasshopper component

Hi,

I am trying to load .dll file in grasshopper component. It fails to load in C# editor and compiled component.
The .dll contains only several methods calling native C++ functions.
I was using this .dll in simple console application but I do not understand why it is not working in Grasshopper.

Why I cannot load it?

error: Could not load file or assembly ‘MinkowskiWrapper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified. (line: 369)

inside that .dll I have only this class:

Do you have minkowski.dll in the same folder as the wrapper DLL? Are all DLL’s 64-bit?

See my reply at Catching PINVOKE exception from loaded assembly it may help you as my plugin was suffering from dependency issues and as yours was working as a console app.
By the way… are you by any chance working on a nesting algorithm?

Solved. It was the problem of 64 bit. Once it is compiled on 64 it works well. Yes it is for nesting, glad that it runs now


2 Likes

Nice! Once I finish another project to visualize weather data I will come back to my nesting algo.