Could not load RhinoCommon

Hi All,
I use C# to make a Rhino plugin in version 8.
When I run the application it have error below. In reference I added this file
Please help me to find solution to fix it!
Thanks

image

image

how are you running the plugin? it may be helpful to set up a launch profile for your project as here Unable to start Rhino8 from Visual Studio 2022 for debugging - #3 by david.birch.uk

Thank you so much for quick response
In my project folder I do not see file launchSettings.json

image

Thanks

It looks like you’re referencing the DLL from Rhino’s Folder? I would use the RhinoCommon, Rhino.UI and Eto.Forms Nuget packages if you’re not.

This error can also occur if the dlls are copied into the build directory, which you want to avoid, you can append the Private/PrivateAssets to the import as below

<PackageReference Include="<PackageName>" Version="<Version>" Private="False" PrivateAssets="all" />
1 Like

Hi,
I have added these *dll files into project

And this error show again
Thanks

Can you try clearing your build folder to ensure the dlls are not in there?

1 Like

I try clean this folder but this error not done

Hi @nguyentheta2002,

You might want to zip and post your project.

— Dale

1 Like

Hi,
Please check my project in link below

Dear @dale
Please check in my file in link above
Thanks

Hi @nguyentheta2002,

The RhinoCommon your project is referencing is for us in Rhino plug-ins.

If you want to access Rhino from a standalone .NET application, use Rhino.Inside.

Here are a couple of samples:

RhinoInsideText.zip (3.4 KB)

– Dale

1 Like