After updating to Rhino SR36, my plugin AssembleRhino (it’s on the PackageManager) does not work anymore. When calling the command AssembleRhino, I get the following error message:
Summary
Compile Error
Assuming assembly reference 'System.Drawing.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'RhinoCommon' matches identity 'System.Drawing.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Drawing.Primitives', you may need to supply runtime policy (Warning CS1701) file:///:[1:1]
Assuming assembly reference 'RhinoCommon, Version=8.0.23304.9001, Culture=neutral, PublicKeyToken=552281e97c755530' used by 'AssembleRhino' matches identity 'RhinoCommon, Version=8.36.26293.11001, Culture=neutral, PublicKeyToken=552281e97c755530' of 'RhinoCommon', you may need to supply runtime policy (Warning CS1701) file:///:[1:1]
The type 'IPointer<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.Windows.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. (Error CS0012) file:///C:/Users/aless/.rhinocode/stage/ndehnavd.m2g:[161:8]
Assuming assembly reference 'System.Collections.Specialized, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'RhinoCommon' matches identity 'System.Collections.Specialized, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Collections.Specialized', you may need to supply runtime policy (Warning CS1701) file:///:[1:1]
The variable 'offsetMeshConduit' is declared but never used (Warning CS0168) file:///C:/Users/aless/.rhinocode/stage/ndehnavd.m2g:[62:32]
The local function 'DebugClash' is declared but never used (Warning CS8321) file:///C:/Users/aless/.rhinocode/stage/ndehnavd.m2g:[431:6]
The local function 'GetHandleIndex' is declared but never used (Warning CS8321) file:///C:/Users/aless/.rhinocode/stage/ndehnavd.m2g:[953:5]
The local function 'GetHandleTypes' is declared but never used (Warning CS8321) file:///C:/Users/aless/.rhinocode/stage/ndehnavd.m2g:[1019:7]
Error occured running command "46cf67ef-01de-4ff3-9805-6426bc8ea3bf" | Compile Error
Assuming assembly reference 'System.Drawing.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'RhinoCommon' matches identity 'System.Drawing.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Drawing.Primitives', you may need to supply runtime policy (Warning CS1701) file:///:[1:1]
Assuming assembly reference 'RhinoCommon, Version=8.0.23304.9001, Culture=neutral, PublicKeyToken=552281e97c755530' used by 'AssembleRhino' matches identity 'RhinoCommon, Version=8.36.26293.11001, Culture=neutral, PublicKeyToken=552281e97c755530' of 'RhinoCommon', you may need to supply runtime policy (Warning CS1701) file:///:[1:1]
The type 'IPointer<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.Windows.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. (Error CS0012) file:///C:/Users/aless/.rhinocode/stage/ndehnavd.m2g:[161:8]
Assuming assembly reference 'System.Collections.Specialized, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'RhinoCommon' matches identity 'System.Collections.Specialized, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Collections.Specialized', you may need to supply runtime policy (Warning CS1701) file:///:[1:1]
The same occurs if I run the uncompiled script from directly from the ScriptEditor
The first line of the script is:
// #! csharp
But it does not matter much, since the errors persist even if I delete it.
The error referring to the IPointer<> type appears on the InstalledFontCollection word on this part of the code:
// CHECK IF FONT EXISTS
using (InstalledFontCollection fontsCollection = new InstalledFontCollection())
{
List<string> fonts = new List<string>();
FontFamily[] fontFamilies = fontsCollection.Families;
foreach (FontFamily font in fontFamilies)
fonts.Add(font.Name);
if (!fonts.Contains(fontFace))
{
string dialogText = "Please install *JetBrainsMono NFM* font for a better interface experience" + eol + eol + "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/JetBrainsMono.zip";
Dialogs.ShowMessage(dialogText, frameMsg, ShowMessageButton.OK, ShowMessageIcon.Warning);
fontFace = "Cascadia Mono";
fontFaceAngle = fontFace;
}
}
If, as the error suggest, I try to add using System.Private.Windows.Core;, I get the following error:
The type or namespace name 'Windows' does not exist in the namespace 'System.Private' (are you missing an assembly reference?) (Error CS0234)
If necessary, I can attach the whole script, but it’s quite extensive and I don’t know how to make a minimal version of it because, other than the bit I pasted above, I don’t know why it causes those errors.
It’s quite urgent, since this is a script my students use and they can’t go on without it. I cannot make them roll back to a previous version of Rhino either, unless you send me a direct link to the SR35.