I tried to load the components created by C++/CLI to Dynamo project. The project is written in C# to read some nodes and create the trusses out from the nodes.
I implemented in C++ some native operations to compute the truss internal force, load on node, etc. I used CLI to export that C++ components to C#. I reference the CLI project in C# project in order to use the wrapped native classes. However, when I used the CLI components in C#, for example
private Point m_dyn_point;
private Node(Point point)
{
m_dyn_point = point;
m_node = new OOFEMcli.Node(0, m_dyn_point.X, m_dyn_point.Y, m_dyn_point.Z); // create new instance of CLI class
}
That gives me an error when I launch the plugin in DynamoSandBox. It says that the CLI assemblies failed to load
I used Costura.Fody to wrap all assemblies in one DLL. Now Dynamo can load the plugin, but another error came up
Probably, the error is because Dynamo cannot load lower native “unmanaged” (but it’s managed by CLI). That’s strange because I tried to load the same CLI in other project in C# (not related with Dynamo) and it’s working just fine.