The primary issue was that the Project in VS was still set to copying DLLâs into the plugin folder, (I have to use VERY specific Microsoft Dynamics DLL versions to negotiate with our ERP, The dynamics DLLâs only want to play with specific security dllâs too etc etc..its a bit touchy, so when bug shooting this before I made VS copy ALL DLLs to the install folder and then loaded while incrementaly deleting/swapping them to find my culprit, forgot to turn that off.
I am unsure why this was not an issue in the Rhino8 plugin install though as they are still in that install now, anyhow, removing them at least got the plugin to stop saying it wanted to run in .netframework. and attempted loading long enough to pop error messages on the command line in Rhino 9 about the failed loading issue⌠Rhino reported the Plugin had no GUID.
(Rhino9 command line error:)
Error occurred loading plug-in Details: plugInId Canât be Guid.Empty (Parameter âplugInIdâ)
here im not sure why this failed, but, Claude added the same GUID back into the plugin class, and added this wierd little idField bit routine with some USINGS, and it stopped failing to load.
using Rhino.PlugIns;
using Rhino.UI;
using System.Runtime.InteropServices;
using System.Reflection;
namespace Pallion.RhinoDock
{
[Guid(â6cef8511-a474-4679-af71-f4e919de7a76â)]
public class PallionRhinoDockPlugIn : Rhino.PlugIns.PlugIn
{
public PallionRhinoDockPlugIn(){Instance = this;}
public static PallionRhinoDockPlugIn Instance{get; private set;}
protected override LoadReturnCode OnLoad(ref string errorMessage)
{
if (Id == Guid.Empty)
{
var idField = typeof(PlugIn).GetField("m_id", BindingFlags.Instance | BindingFlags.NonPublic)
?? typeof(PlugIn).GetField("_id", BindingFlags.Instance | BindingFlags.NonPublic)
?? typeof(PlugIn).GetField("Id", BindingFlags.Instance | BindingFlags.NonPublic);
if (idField != null && idField.FieldType == typeof(Guid))
{
idField.SetValue(this, GetType().GUID);
}
}
System.Type panelType = typeof(CAM_Uploader);
Panels.RegisterPanel(this, panelType, "PalloysCAM", Pallion.RhinoDock.Resources.Icon);
return LoadReturnCode.Success;
}
}
}
That code is NOT in the Rhino 8 / Core 8 version and it loads and runs fine in Rhino 8, that is the only code diffrence between the two installs.
here is the version of that code that loads and runs fine in Rhino 8
using Rhino.PlugIns;
using Rhino.UI;
namespace Pallion.RhinoDock{
public class PallionRhinoDockPlugIn : Rhino.PlugIns.PlugIn{
public PallionRhinoDockPlugIn(){Instance = this;}
public static PallionRhinoDockPlugIn Instance{get; private set;}
protected override LoadReturnCode OnLoad(ref string errorMessage){
System.Type panelType = typeof(CAM_Uploader);
Panels.RegisterPanel(this, panelType, âPalloysCAMâ, Pallion.RhinoDock.Resources.Icon);
return LoadReturnCode.Success;
}}}