System.Drawing.Color conversion

Hello, I updated the library from 49.0.1202 to 49.0.1301 and started getting “Argument 2: cannot convert from ‘System.Drawing.Color’ to ‘GemBox.Spreadsheet.SpreadsheetColor’” errors when trying to pass System.Drawing.Color to SetBorders , SetSolid and other methods, looks like conversion is broken

Hi Petro,

The problem is that you’re probably ending up with the GemBox.Spreadsheet for .NET Standard 2.0 which doesn’t have System.Drawing.Common dependency.

Note that starting from version 1225 we have replaced GemBox.Spreadsheet for .NET Core 3.1 with GemBox.Spreadsheet for .NET 6.0 on Windows.

So please try targeting “net6.0-windows” from your project file:

<TargetFramework>net6.0-windows</TargetFramework>

Or “net7.0-windows”:

<TargetFramework>net7.0-windows</TargetFramework>

Does this solve your issue?

Regards,
Mario

1 Like

looks like you need here a major update not a minor:)

Hi Petro,

Actually, it doesn’t matter because the license keys are bound to the purchase date, not to the major version.

In other words, you can basically ignore the major version, the only thing that is important is if you’re within your support period.
When you’re within your support period, you can feel free to use the latest version that was released.

Regards,
Mario