I’m currently trying to run our plugin in Rhino 8 WIP. This works fine when I set the .NET runtime to be the .NET Framework, but just crashes the whole application when the runtime is NETCore.
I can reproduce this with a simple plugin (C#, .NET Framework 4.8) that creates a dock bar in OnLoad:
var mRhinoUiDockBar = new RMA.UI.MRhinoUiDockBar( Guid.NewGuid(), "DockBar", new Panel()); RMA.UI.MRhinoDockBarManager.CreateRhinoDockBar( this, mRhinoUiDockBar, false, RMA.UI.MRhinoUiDockBar.DockLocation.bottom, RMA.UI.MRhinoUiDockBar.DockStyle.any, new System.Drawing.Point(0, 0));
Is the crash expected here? Could this be fixed or improved to throw a meaningful error that can be handled?
Then I have another question, is it possible to set SetDotNetRuntime from RhinoCommon?
I’m checking the current runtime via System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription and try to set the runtime via RunScript in case it is the wrong one, but I guess I’m doing something wrong here:
Rhino.RhinoApp.RunScript(“_-SetDotNetRuntime Runtime=NETFramework”, true)
The command is not correctly executed, it just prints “Command: _-SetDotNetRuntime” in the command line but doesn’t change it.
Thank you in advance and best regards