C# Kangaroo custom goal not working?


I am trying to use a grasshopper file containing a custom C# goal by Daniel Piker.

I hadn’t experienced any issues opening the file before; now I need a little bit of help.

First, the C# goal says KPlankton isn’t found:

  1. Error (CS0246): The type or namespace name ‘KPlankton’ could not be found (are you missing a using directive or an assembly reference?) (line 27)

Not sure what this means, I do have Plankton in my library folder

If I open the code and delete line 27, following a similar issue in a different thread, then I get this other warning:

  1. Warning (CS1701): Assuming assembly reference ‘RhinoCommon, Version=5.1.30000.13, Culture=neutral, PublicKeyToken=552281e97c755530’ matches ‘RhinoCommon, Version=6.34.21034.7001, Culture=neutral, PublicKeyToken=552281e97c755530’, you may need to supply runtime policy

Not sure what this means either, yet following another similar thread, I right-click the C# goal and go to “Manage assemblies”, where I click ‘add’ to then specify the current kangaroosolver.dll location.

Warnings go away and the C# goal looks ‘normal’:

Nonetheless, the kangaroo solver does not seem to accept said goal:

I have Rhino 6, 7, and WIP installed, with no .dll or .gha warnings when I open them separately.

My Libraries folder shows the following kangaroo-related .dlls and .ghas:

I believe this is happening with any C# goal going into kangaroo, as I am experiencing this with more than one file.

How can I solve this issue? Is this related to having multiple installs?

Thank you for your feedback

Hi @corellaman

The important thing is to reference the same copy of the Kangaroo library being loaded by the version of Rhino you are currently running.
For instance, if you are running Rhino 6 and you reference the copy of Kangaroo from the Rhino 7 folder, it won’t work.

I believe the directories are usually:

C:\Program Files\Rhino 6\Plug-ins\Grasshopper\Components

C:\Program Files\Rhino WIP\Plug-ins\Grasshopper\Components
(if you first installed v7 when it was a WIP)

C:\Program Files\Rhino 7\Plug-ins\Grasshopper\Components

C:\Program Files\Rhino 8 WIP\Plug-ins\Grasshopper\Components


Thank you!

This solves the problem, which I created in the first place reinstalling Rhinos to a separate storage drive and kept choosing the .dlls from the ‘libraries’ in Roaming :zipper_mouth_face:

Thank you @DanielPiker

*and forgive me for not reading the ReadMe