RhinoCommon / KangarooSolver assembly version conflict

Hey, I’m trying to build some custom Kangaroo2 Goals, so I’m referencing KangarooSolver.dll from the Rhino 7 installation folder.
Unfortunately, it’s impossible to build against the current version and I don’t understand why this error happens. I have triple checked the assembly versions from nuget and can’t wrap my head around what I’m doing wrong, since on the right hand side the correct assembly version is shown. But in the error message, for some reason RhinoCommon assembly version is always one digit smaller than K2 assembly version. This also happened to me with 7.8.x:

Can somebody help? @DanielPiker do you know why this is happening? Any hints appreciated.

You probably need AssemblyRedirect, see Redirecting Assembly Versions | Microsoft Docs

To do this add an app.config file to your project and fill in the correct name, public key token and versions

  <assemblyIdentity name="someAssembly"
    culture="en-us" />
  <bindingRedirect oldVersion="" newVersion="" />

Hey, thank you for your advice! It partly solves the problem - the two warning messages are gone now, but the error concerning KangarooSolver.dll persists :frowning:

This is how I specified the App.config file:

      <assemblyIdentity name="RhinoCommon"
        culture="neutral" />
      <bindingRedirect oldVersion="7.9.21222.15001" newVersion="7.9.21222.15000" />
      <assemblyIdentity name="Grasshopper"
        culture="neutral" />
      <bindingRedirect oldVersion="7.9.21222.15001" newVersion="7.9.21222.15000" />

Hmm… I don’t know to be honest. the root cause seems to be that Kangoroo has used a different RhinoCommon assembly to link with. Maybe contact the developers of Kangaroo directly?

I’m not sure exactly what is going on here, but I’ll look into it.
Which versions of Rhino do you currently have installed?

1 Like

Thank you Daniel!
Currently I have only installed 7.9.21222.15001 from today, I had Rhino 8 WIP installed until a couple of days ago though. Deinstalled it last week when I was troubleshooting some other problem (which turned out to be unrelated to WIP).