Set Method in ArchivableDictionary not working in VisualStudio

Hello,

I am updating my pluging that I have written for Rhino 6 to Rhino 8 using .NET Core 7.0 and .NET Framework 4.8.

I get a very strange error in Visual Studio when calling the Set method of an ArchivableDictionary. As shown in the image:

The error message is: The type ‘Font’ is defined in an assembly that is not referenced …

When removing the .NET 7.0 target in the project and keeping only .Net Framework 4.8, it compiles. However Rhino8 does not run with it, since it is configured to run with .NET 7.0.

May be something is wrong with my .NET 7.0 installation in Visual Studio 2022?
In the solution explorer I see some warning:

Does anybody have the same issue and knows a solution?

thanks,

Samuel

Hi @samuel.hartmann,

The comments are pretty self explanatory: use NuGet and add a reference to System.Drawing.Common to your project.

Does this help?

– Dale

Thanks Dale,

This helped. I’m sorry I’m not too familar with the package management in VisualStudio.

best regards,

Samuel