Compilation error with combined Rhino and Grasshopper plugin

Hey all,

I am running into a problem with a combined Rhino and Grasshopper c# plugin, whereby the Grasshopper plugin is requiring the compiled version of the Rhino plugin. Since roughly 2/3 days the versions of RhinoCommon do not match anymore.

Within the Rhino plugin, RhinoCommon is referenced with the path to the Rhino installation path. The Grasshopper takes the plugin and is including RhinoCommon through NuGet.
GH: image
Rhino: image

The Rhino plugin compiles fine. However, once I am trying to compile the GH plugin I run into the following error message:
Assembly plugin with identity plugin, Version=1.0.7986.28769, Culture=neutral, PublicKeyToken=null verwendet RhinoCommon, Version=7.12.21313.6341, Culture=neutral, PublicKeyToken=552281e97c755530 mit einer höheren Version als die referenzierte Assembly RhinoCommon mit Identität RhinoCommon, Version=7.12.21313.6340, Culture=neutral, PublicKeyToken=552281e97c755530. (my appologies for the German comments. I hope it is still understandable.)

The RhinoCommons are basically the same, however, taken from different folders, and accordingly, it does not work. It adds an additional 1 to the end however the sources are identical.

Would anyone have any idea how to fix this? It used to work before, however, for a couple of days, it does not want anymore.

Any help would be highly appreciated. Thank you!
Tobias

Modify your plugin project to reference RhinoCommon via nuget instead of using a local path

Thanks, that works.

Is this the recommended way? While getting RhinoCommon from nugget I always have to update it separately once that Rhino has had an update. Through the path to the installation folder, this happens automatically.

Using nuget is the recommended way. You can continue to target an older version of RhinoCommon even after updating Rhino.

1 Like

ok. Many thanks!