C# plugin on Mac issue

I’m having a related(?) issue building a C# plugin on Mac –

var dict = new Rhino.Collections.ArchivableDictionary (1,"Foo");
dict.Set ("Bar", 1.0);

results in the error “The type ‘Font’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Drawing.Common’“.

I know very little about .net, so I’m not sure if this is a problem with my setup, or if it’s because one of the overloads of ArchivableDictionary.Set() takes a Font parameter (despite me not using that overload). The documentation seems to contradict itself on whether that means System.Drawing.Font or Rhino.DocObjects.Font; in any case, I am confused.

As far as I can make out I am using net7.0 and RhinoCommon 8.0.23304.9001.

Can I do something different to avoid this error? Or should I work around using ArchivableDictionary altogether?

Hey @bobtato, you can add this to your .csproj and it’ll resolve your issue :slight_smile:

  <ItemGroup>
    <PackageReference Include="System.Drawing.Common" Version="7.0.0" ExcludeAssets="runtime" />
  </ItemGroup>

That does resolve the issue, thanks!