on Rhino8 for the MAC how do we access winforms? Meaning that all the UI extension for grasshopper are tided to winform and in .net 7 winforms are not available on the mac. Is there something I am missing? E.g. the following code will not build on the mac (C#)
public override bool AppendMenuItems(ToolStripDropDown menu)
{
var output = base.AppendMenuItems(menu);
Menu_AppendSeparator(menu);
Menu_AppendItem(menu, textItem, (s, e) => { RhinoApp.WriteLine("Does not build"); });
}
is there a package on nuget that we can reference or any suggestion you have?
@Alberto The ToolStripDropDown is a System.Windows.Forms type. On macOS try adding System.Windows.Forms in the Rhino 8 folder to your project. Do not include that with your plugin distribution as it is already shipped with Rhino
@curtisw Is there a NuGet package to use for macOS Grasshopper plugin builds that need access to ToolStripDropDown and other similar types?
@curtisw would it be possible to include the mac-specific versions of System.Windows.Forms.dll and System.Drawing.Common.dll in the RhinoCommon nuget package (for the macos platform) ?
Yes we can add that, currently the only way to get access to System.Windows.Forms is to target net48. As for System.Drawing.Common it’s already a nuget package which you can reference (but don’t include the .dll as part of your plugin). I’ve created RH-80655 to get that included.