I’ll updated my GH plugin from Rhino 5 to Rhino 6. Now, when I try to load GH with my plugin, I’ll get MissingMethodException for AddVectorParameter(). All other function AddxxxParameter are found, so I assume that the references to the GH_IO.dll and Grasshopper.dll are okay.
I call it e.g. as follows:
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
pManager.AddIntegerParameter(“LC”, “LC”, “LC”, GH_ParamAccess.item, 0);
pManager.AddVectorParameter(“Direction”, “D”, “Direction”,
GH_ParamAccess.item, new Vector3d(0, 0, -1));
Does anyone have an idea what the problem could be? Am I missing something?
hmm, that method definitely still exists. Extract from the current source:
Public Function AddVectorParameter(name As String, _
nickname As String, _
description As String, _
access As GH_ParamAccess, _
[default] As Vector3d) As Int32
Merkwürdig. Does this happen when you try to load the plugin compiled against GH0.9 into GH1.0, or the other way around, or…?
I took the dll provided in the Rhino6 distribution. The version number in VS is showing 6.1.18037.13441. That is also the version number of Rhino6. (Before updating it, it was 22.214.171.124). Is it possible to have different GH versions while loading?
GH is already present in the AppDomain by the time your plugin loads, so whatever version is there is the one you get.
Can you upload the GHA or send it to me privately if you don’t want to make it public?
I found the reason. The library folder is changed for both Rhino versions when changing it in one. So it tried to load the old plugin.
Thank you for your help!