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

<dependentAssembly>
  <assemblyIdentity name="someAssembly"
    publicKeyToken="32ab4ba45e0a69a1"
    culture="en-us" />
  <bindingRedirect oldVersion="7.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
2 Likes

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:

<configuration>
  <runtime>
    <dependentAssembly>
      <assemblyIdentity name="RhinoCommon"
        publicKeyToken="552281e97c755530"
        culture="neutral" />
      <bindingRedirect oldVersion="7.9.21222.15001" newVersion="7.9.21222.15000" />
    </dependentAssembly>
    
    <dependentAssembly>
      <assemblyIdentity name="Grasshopper"
        publicKeyToken="dda4f5ec2cd80803"
        culture="neutral" />
      <bindingRedirect oldVersion="7.9.21222.15001" newVersion="7.9.21222.15000" />
    </dependentAssembly>
  </runtime>
</configuration>

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).