Missing DLL exception: 'rhcommon_c.dll', xUnit + RhinoCommon Integration

Dear all,

I am experiencing some issues regarding the integration of xUnit with an existing Visual Studio C# project + RhinoCommon. I am using Visual Studio 2022 with Microsoft .NET framework 4.5.2 and the plugin RhinoCommon with version 6.35.21222.17001. I created a test which has to run Rhino 6 and after a couple of seconds a Rhino command in it, using RhinoApp. The problem is that the test is not able to run the command but it raises a “System.DllNotFoundException” exception about the rhcommon_c.dll library. I tried to edit the properties of the RhinoCommon reference by setting the key “CopyLocal” to false but now it cannot find RhinoCommon. Any clues about the solution? Many thanks in advance!

I suggest you consider rhino.inside, here is example rhino-developer-samples/rhino.inside/dotnet/SampleUnitTests at 8 · mcneel/rhino-developer-samples (github.com), that require at lease rhino 7.

1 Like

Thank you for your suggestion. I had taken a look at it but unfortunately I have to use Rhino 6 for this project.

Thank you for the repository. I managed to test it and it works. Now I am adapting it to my project. Many thanks again!

1 Like