Plugin loading and enabling problem

Hi All. One of my users had a problem loading my plugin on Rhinoceros5 64 in windows 10.
I try to tell what is happening .
First it was a problem of registry key because the installer put that key to rhino6 .I didn 't know so I tried dragging the .rhp file in rhino but it was not possible(same thing trying loading it from preferences).
After correcting the registry key in the installer, the plugin may be loaded but not enabled and if i try to enable it from preferences it gives me error, it is not possible .
I don’t have any info but from my log file i see that files needed from my plugin are ok, the constructor of the sublcass of : Rhino.PlugIns.PlugIn is read but the code does not enter the event Rhino.RhinoApp.Initialized .
All other users don’t have the problem .
I see also in rhino preferences that in my plugin properties there is not available the version (all commands are in the list and other info are ok).

Hi @gianfranco74,

There is a lot going on here. So I want to take a step back a little.

I assume you’ve written a plug-in, using RhinoCommon, for Rhino 5. Is this correct? Keep in mind that many RhinoCommon plug-ins that work in Rhino 5 will also work in Rhino 6.

You mention something about a registry key and the installer. What installer? Did you write your own installer or did you create a RUI file?

What versions of Rhino 5 and Rhino 6 are you (or your customer) using?

Can you repeat this installation problem?

– Dale

I create a plugin for rhino 5 and for rhino6 .
I wrote my own installer that put the registry key in the the path you can see in the attachment.

RhinoCommon 5.10.41201.111.45,
and matching
Rhinowindows, Rhino_DotNet

RhinoCommon 6 latest and matching
Rhinowindows, Rhino_DotNet

Two toolbars are in a user/AppData/roaming subfolder

MyPlugin .Rhp and other .dll are in a ProgramFile subfolder.

Other users don’t have the problem, i think it is a problem of its machine, he should reset it.

His collaborator works on his left and he has no problems .(Window 10)

I cannot debug obviously on his machine so to understand what is happening

my plugin write a .txt file when rhinoceros enters the costructor of my Rhino.PlugIns.PlugIn subclass and when it enters the event Rhino.RhinoApp.Initialized += RhinoApp_Initialized.

As i said the constructor is fully read ,while RhinoApp_Initialized
event is not triggered.

I did not use events like

Application.ThreadException += Application_ThreadException

AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException

AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException

because they may be triggered by something external to my plugin.

But while i’m writing now to you i am thinking that i could use them to write exception only for the time required for loading.

I will try and i will give probably more info. Thank you very much



Hi Dale, Thanks to you i saw something that happens . Don’t spend your time, i have a way to understand what is happening now. I will give you info

Hi Dale.
I saw from my log file that the code enters the constructor but throw an exception before activating initialized event(that is the reason why it is not triggered).

The problem is that Properties. Settings. Default are null and I don’t understand why.

I had ruled out that it could be a code problem and I thought it was a problem of installing the plugin.

I will give you info as soon as it is possible. Sorry if I did not think to this procedure before, but Properties. Settings. Default =null was beyond my imagination