C# Script working in Rhino 8 causes error in Rhino 9 WIP

// #! csharp
using System;
using System.Collections.Generic;
using System.Drawing.Text;
using System.Drawing;
using Rhino.UI;

string fontFace = "JetBrainsMono NFM SemiBold";
string fontFaceAngle = "JetBrainsMono NFM Medium";
string frameMsg = "Rhino is sad!   :'(";
string eol = System.Environment.NewLine;

// CHECK IF FONT EXISTS
using (System.Drawing.Text.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;
	}
}

The script above works fine in Rhino 8 (SR31), but when I open it in Rhino 9 WIP (9.0.26153.12415, 2026-06-02) script editor, I get the following error:

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’. (CS0012) [14:8]

What is going on?

Great catch! Thanks for letting me know. Created this YT and working on a fix (this is related to Rhino WIP running in a newer runtime)

RH-96184 C# script is missing windows private dll