I am trying to perform Unit Tests on my C# Karamba Objects and get following error:
System.TypeInitializationException : The type initializer for ‘feb.karambaPINVOKE’ threw an exception.
---- System.TypeInitializationException : The type initializer for ‘SWIGExceptionHelper’ threw an exception.
-------- System.EntryPointNotFoundException : Unable to find an entry point named ‘SWIGRegisterExceptionCallbacks_karamba’ in DLL ‘karamba’.
I do not get that error when I run the Unit Tests provided for Karamba 1.3 on GIthub. Is there somehting special to take into account when making unit tests?
hello @lfuhrimann, make sure that you reference the correct karamba.gha, karamba.dll and karambaCommon.dll. Otherwise the interface definitions in karambaCommon.dll are not compatible with the C++ karamba.dll library.
The unit test project hasn’t been updated yet for karamba3D 1.3.3. So when you run it you will have to make changes to some method calls. We are working on an updated of the unit-test project.
– Clemens
Thank you @karamba3d for the response. I made sure that I use the correct versions for running the unit tests. When I look at your unit test solution I can not find any references to the karamba.gha or karamba.dll. How do you reference those in for the unit tests?
I saw that you copied karamba.gha methods in the src file of karambacommon_tests_GH.
I can run my own tests with an open Rhino inside of grashopper and they work, but when I run the same test as a unit test in c# it fails with the error above.