Hello. I’m developing a rhino plug-in ( XHull) using visual studio preview 2022 and rhinoCommon 8.0.23304.9001. Up to now ( before i updated Rhino for the latest version … (which is may be not related ?)) everything was working perfectly: the plug-in was loading by itself But now the plug-in doesn’t load anymore when I launch it from visual studio (I get an error message from Rhino saying “Unable to load XHull.rhp plug-in: initialisation fail”. The plug-in doesn’t seems to be responsible because I can load it “manually” from Rhino with the command : tools /options/… " Load plug-in" Also, if I shut off Visual studio and run Rhino by itself , the “load plug in” command doesn’t work anymore . Can someone help ? Thanks
For reference, here is the system info you had sent in to support.
Rhino 8 SR13 2024-11-12 (Rhino 8, 8.13.24317.13001, Git hash:master @ ca3666c3ebed2b9567e10930077bfa0884f65db9)
License type: Commercial, build 2024-11-12
License details: Cloud Zoo
Windows 11 (10.0.22631 SR0.0) or greater (Physical RAM: 32GB)
.NET 7.0.0
Computer platform: LAPTOP - Plugged in [100% battery remaining]
Non-hybrid graphics configuration.
Primary display and OpenGL: NVIDIA GeForce RTX 4070 Laptop GPU (NVidia) Memory: 8GB, Driver date: 2-22-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 546.80
> Integrated accelerated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
Primary OpenGL: NVIDIA GeForce RTX 4070 Laptop GPU (NVidia) Memory: 8GB, Driver date: 2-22-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 546.80
> Integrated accelerated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
Secondary graphics devices.
Intel(R) UHD Graphics (Intel) Memory: 1GB, Driver date: 3-16-2023 (M-D-Y).
> Integrated graphics device with 4 adapter port(s)
- There are no monitors attached to this device. Laptop lid is probably closed
OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
GPU Tessellation is: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)
Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High
Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 2-22-2024
Driver Version: 31.0.15.4680
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8188 MB
Rhino plugins that do not ship with Rhino
Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.13.24317.13001
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.13.24317.13001
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.13.24317.13001
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.13.24317.13001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.13.24317.13001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.13.24317.13001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”
We need more information. Depending upon how old your project file is, you will have different properties screens for the project.
How are you launching from Visual Studio when you debug?
If your project properties look like these, show us a screenshot:
If you have a newer project format, you will have debug profiles in your project properties, so show us this:
You may also need to set whether you are launching rhino in .Net Core mode or .Net Framework mode. What are you building for Core or FW? If you are targeting .Net 4.8 you have to pass the /netfx switch to rhino on startup, otherwise it won’t be able to load your plugin.
Let us know a little more about your scenario and we can help.
– Jason
Hello Dale , here it is
XHull.rhp (10.5 KB)
Hello Jason. Following your request i see that there might be a problem with the Environment variable ? Also I built with Rhino 8 netcore. As for the target frame work, at the beginning i was using the template’s default values which are net7.0;net48 but i tried net8.0 .
Hope this to clarify and thanks for your help ! Johnny
Johnny,
Looks like that plugin has a dependency on XUtils 1.0.0.0 so I don’t think @dale will be able to load that plugin, unless you also include that dll.
I see you’ve referenced RhinoCommon 8.13.24317.13001, are you sure have that NuGet package and at least that version of Rhino installed?
I don’t see that you are overriding the default plugin load behavior, so it won’t currently load your plugin until you execute one of the rhino commands in the plugin.
Have you tried running the command: XHullCommand to see if it loads your plugin?
If you want it to load on startup, you can change that behavior in your plugin class.
The default behavior of Rhino is to only load your plugin when needed (like you execute a command):
If in your plugin class you override this behavior, it could load on startup:
Hello Jason and the others helping. I confirm that i do have the right Rhino version is Rhino 8 SR13 2024-11-12 (Rhino 8, 8.13.24317.13001) as you can see in the system info file that i sent to Matt. Anyway the problem is now solved. Here is what i did : 1- I clean up the registry of any trace of the previous plug-in . 2- I had created a new plug in and simply made reference of the previous plug in code and it work perfectly without any other modification. Thanks everyone for your help