Eto.Forms nuget differs from the version coming with Rhino

Hey all,

I have noticed a slight incompatibility beween the version of Eto.Forms that ships with Rhino and the one on Nuget.

Steps to reproduce:

  • create a new c# project, add the Gh / RhinoCommon nugets
    • Eto 2.5.0 is installed as a dependency as well
  • add the following code to a class:
var form = new Eto.Forms.Form();
form.Owner = Grasshopper.Instances.EtoDocumentEditor;
  • VS will complain with the following error (in the editor):
  • Update the Eto Nuget to 2.5.7 (latest), the problem still persistes

If instead I remove the Nuget and reference the Eto.dll in my Rhino installation folder the error goes away. It seems that’s because Rhino is using a 2.5.7-dev version.

Workaround:
We’ve currently copied a Eto-2.5.7-dev.dll in our repo, but ideally we wouldn’t have to do so :slight_smile: .

Is there anything we could/should be doing differently?
Thanks!

Hey @_teocomi,

I’m not sure how exactly you have your project set up (sdk-style, package.config, referencing rhino dll’s directly), but I would recommend removing all references to RhinoCommon, Grasshopper, GH_UI, Eto.Forms, and simply use these nuget packages:

  • RhinoCommon - this includes RhinoCommon.dll, Rhino.UI.dll, and Eto.dll that is compatible with Rhino
  • Grasshopper - includes Grasshopper.dll and GH_IO.dll

Hope this helps.

1 Like

Hey Curtis,

Apologies for the time wasted, I got it!
The issue was that I had an explicit reference to the Eto nuget but, as you say, this is not needed if I’m already referencing the Rhino nuget.

It took me a while as I assumed the Rhino nuget would get Eto as dependency but it’s instead included in its own nuget.

Thanks again!

1 Like