Aspose.Cells.GridJs: The type initializer for 'Gdip' threw an exception. System.Drawing.Common is not supported on non-Windows platforms

Hi,

I had Aspose.Cells license and use Aspose.Cells.GridJs to show Excel files in web application to users. Code is deployed to Linux. But unfortunately after upgrading to .NET 8 I face exception for some of the Excel files:

System.TypeInitializationException:
at System.Drawing.SafeNativeMethods+Gdip.GdipCreateFontFamilyFromName (System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
at System.Drawing.FontFamily.CreateFontFamily (System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
at . (Aspose.Cells.GridJs, Version=24.8.0.0, Culture=neutral, PublicKeyToken=699ccf88ff76f11a)
at . (Aspose.Cells.GridJs, Version=24.8.0.0, Culture=neutral, PublicKeyToken=699ccf88ff76f11a)
at . (Aspose.Cells.GridJs, Version=24.8.0.0, Culture=neutral, PublicKeyToken=699ccf88ff76f11a)

It seems Aspose.Cells.GridJs is still not upgraded to not use System.Drawing.Common (6.0.0) at non-Windows machines and Aspose.Cells.GridJs nuget package has System.Drawing.Common as dependency.

image.png (48.3 КБ)

I found similar issue for other Aspose project. I believe For GridJs we need similar fix:

Can you please fix this?

@vitalii.z,

Thanks for the details and screenshot.

We need to examine your issue in detail. Did you find the issue with all files or just some files? If the issue is only with a few files, could you please zip and share those files? In the meantime, we have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSGRIDJS-1282

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi,

The issue appears in only specific files. With most files it’s working normally.

I prepared a file for which the issue is reproducible, please see it below:
gridJsExceptionFile.zip (13.9 КБ)

Hope it helps.

@vitalii.z,

Thanks for the sample Excel file.

I have logged the archive with your existing ticket into our database. We will look into your issue soon. Once we have an update on it, we will let you know here.

@vitalii.z
We’ve fixed it.
It will be ready in the next v24.10 release.

The issues you have found earlier (filed as CELLSGRIDJS-1282) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi