The Type Initializer for 'Gdip' Threw an Exception when Using Aspose.Slides for .NET

NET6, Aspose.Slides version 22.3

.NETCoreApp,Version=v6.0 on linux-x64

System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
 ---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
   at System.Drawing.LibraryResolver.EnsureRegistered()
   at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
   at System.Drawing.SafeNativeMethods.Gdip..cctor()

@zhouwei,
Thank you for contacting support.

Unfortunately, Aspose.Slides does not support .NET 6 yet. I’ve linked this forum thread to an appropriate task with ID SLIDESNET-42778 in our issue tracking system. You will be notified when the issue is resolved.

.NET 6 support is planned for Aspose.Slides 22.6. This release will be published in the second half of June.

Hi @Andrey_Potapov - wondering if there’s been any update with this issue? Did not see SLIDESNET-42778 listed in the release notes for this year. My team is currently running into the same issue.

1 Like

@carter.jj,
Unfortunately, support for .NET 6 has been moved to version 22.12. This version will be published in the second half of December. We apologize for any inconvenience.

Ok, thanks for the update. Good to hear this issue is still on the radar at least.

@carter.jj,
At the moment, this is a priority issue.

Hi @Andrey_Potapov, any update on this? I did not see .NET 6 support listed for the December (or January) release. Is this still being worked on?

We are already using .NET 7, but still cannot use Apple Silicon binaries on macOS because of this bug. Please give an update about the release timeline.

@carter.jj, @Marc,
Thank you for your patience. As far as I can see, .NET 6 support is going to appear in Aspose.Slides 23.2. This release will be published in the second half of February. Our developers are testing a new rendering engine.

The issues you found earlier (filed as SLIDESNET-42778) have been fixed in Aspose.Slides for .NET 23.2 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.