Unittests with Rhino.Inside for Rhino 8 plugin

Hey everyone,

I currently run unit tests of my plugin’s components, following the GrasshopperTests sample provided.
It worked fine until now for Rhino 7 plugins, but started failing when I tried releasing the plugin referencing Rhino 8 versions (RhinoCommon, Grasshopper, etc.).

The tests run but the expected vs. actual values don’t match. Actual values are always 0, which indicate that the plugin is not being loaded/executed (had a similar issue before). since there doesn’t seem to be a Rhino.Inside v8.0.0 package yet, is there a way of forcing the Rhino.Inside package to run the tests in Rhino 8?

Hey @pegiachini , @menno has a cool answer here for how to do this

1 Like

@pegiachini For Rhino >=8, we have created Rhino.Testing (currently at beta) library to simplify loading Rhino for unit testing. It uses NUnit as the test runner. See this example project:


There are a few items on this project marked as WIP that we will complete soon.

You should be able to setup a test project for your plugin this way. Let me know if it works for you and if the docs are clear


Hey @eirannejad I can’t see that repo, is it private?

1 Like

oops it’s pullic now :smiley:

1 Like

Awesome work @eirannejad I’ve also been working on a library, would much rather use this one and contribute there now though :slight_smile: .

I see here it says 8.* does this work in Rhino 7 at all, or only 8? Has the RhinoCore resolver changed much? Of course it’d be limited to net48.

This library is only tested with Rhino 8 and net48, net7.0-windows target frameworks

1 Like