Aspose.Slides Linux Container - System.PlatformNotSupportedException: System.Drawing.Common Is Not Supported on non-Windows Platforms

@andrey.potapov , yes please! that would be great.

In other news, authentication is also failing for Aspose Words starting yesterday for us.

Is the issue similar to Aspose.Slides? How can we fix this?

Thank you.

hi @andrey.potapov , we have paid support now. How can we migrate this issue to a paid support ticket?

@sudi.karmacharya,

One of our colleagues from Aspose.Words team will evaluate your issue for Aspose.Words soon. @alexey.noskov FYI.

If you have purchased Paid Support, then you may use the Paid Support account/credentials to login and raise the existing ticket (by referencing this thread) to paid support. To increase the priority of an existing issue from Free Support to Paid Support, it is enough to open a new Paid Support ticket using paid support credentials and paste the link to the Free Support Forum thread. There is no need to re-describe the issue. We will then analyze the issue, increase the priority accordingly, and continue to inform you about the ticket status on Paid Support Helpdesk. See the page on Paid Support FAQs and other policies for your reference.

1 Like

Thank you so much. Appreciate that.

@sudi.karmacharya,
Our developers have investigated the case with the exceptions you described earlier (ticket SLIDESNET-44926).

Currently, there are two main builds of Aspose.Slides for .NET:

Aspose.Slides for .NET

This is the main version of the product. It uses the standard .NET graphics engine.

  • On non-Windows platforms, you may need to install the libgdiplus library.
  • Prior to version Aspose.Slides 25.4, for non-Windows platforms, it was necessary to use the .NET Standard 2.0 DLL from the Aspose.Slides ZIP package.
  • Starting from version Aspose.Slides 25.4, the NuGet package can be used directly even on non-Windows systems.
  • When running on non-Windows systems, your application must include the following line at startup:
AppContext.SetSwitch("System.Drawing.EnableUnixSupport", true);

Aspose.Slides for .NET6 CrossPlatform

This is the version of Aspose.Slides using a custom cross-platform graphics engine developed by the Aspose.Slides team.

On non-Windows platforms, the fontconfig library may be required.

Supported Platforms
  • Windows: x86, x86_64
  • Linux: x86_64
  • macOS: x86_64, ARM64
Planned for Future Support
  • Linux: aarch64 (ARM64) — ETA: end of 2025
Not Planned
  • Windows 11 ARM (ARM64) — Not currently under consideration

We hope this information is sufficient to close the issue. If anything else is required on our end, please let us know.

A bit more information about using System.Drawing.Common when running on non-Windows platforms.

The following native libraries are part of the Aspose.Slides for .NET6 CrossPlatform package.

  • aspose.slides.drawing.capi_vc14x64.dll
  • aspose.slides.drawing.capi_vc14x86.dll
  • libaspose.slides.drawing.capi_appleclang_arm64.dylib
  • libaspose.slides.drawing.capi_appleclang_x86_64.dylib
  • libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so

*.dll - Windows, *.dylib - macOS, *.so - Linux

@sudi.karmacharya

Could you please specify what problem you encounter with Aspose.Words? If possible, please provide code or step by step manual how to reproduce the problem and the exception stack trace if any.

Hey @andrey.potapov ,

Thank you for the explanation. Yes, please go ahead and close the SLIDESNET-44926 ticket.

Best,
@sudi.karmacharya

Hi @alexey.noskov,

I have a paid support ticket open for both Aspose Slides license key regeneration and Aspose words authentication failure.

Would it be best to move our conversation there?

For the time being, I’ll add the stack trace here and a code snippet for both.

Thank you,
@sudi.karmacharya

Here’s the stack trace:

Unhandled exception: System.InvalidOperationException: 
There was an error setting the license: Authentication failed.
   at DocumentServiceLibrary.AsposeTotal.AsposeLicenseManager.SetAsposeMeteredLicense() in /application/app/<>/AsposeTotal/AsposeLicenseManager.cs:line 

Here’s the sample code:

using Aspose.Words;
namespace <>.AsposeTotal;

public class AsposeLicenseManager
{
    static AsposeLicenseManager()
    {
        EnvironmentLoader.LoadEnvironmentVariables();
    }

    public static void SetAsposeMeteredLicense()
    {
        try
        {
            if (Metered.IsMeteredLicensed())
            {
                return;
            }

            // public and private keys set here

            if (string.IsNullOrEmpty(publicKey) || string.IsNullOrEmpty(privateKey))
            {
                throw new InvalidOperationException("Aspose metered keys are not set in the environment variables.");
            }

            Metered metered = new Metered();
            metered.SetMeteredKey(publicKey, privateKey);

            // Retry mechanism to check if the license is applied
            int retryCount = 5;
            int delay = 1000; // 1 second delay

            for (int i = 0; i < retryCount; i++)
            {
                if (Metered.IsMeteredLicensed())
                {
                    return;
                }
                System.Threading.Thread.Sleep(delay);
            }

            throw new InvalidOperationException("Aspose metered license is not applied.");
        }
        catch (Exception e)
        {
            throw new InvalidOperationException("\nThere was an error setting the license: " + e.Message);
        }
    }
}

Hi @andrey.potapov , any progress on the keys regeneration?

@sudi.karmacharya,
Our managers informed me that they sent you the new keys.

@sudi.karmacharya Setting metered license works fine on my side with Aspose.Words. So perhaps the problem is with your keys.

@andrey.potapov , thank you for checking. Where were the keys sent?

Sounds good. I’ll report back once I am able to use the new keys

@sudi.karmacharya,
I am waiting for information from our developers for you. Thank you for your patience.

Thank you @andrey.potapov .

I was wondering if this ticket can be converted to a public post (after deleting sensitive data) or if there’s a way to generate a link that would give permission to see this post to the people I share the link with.

Thank you,
@sudi.karmacharya

@sudi.karmacharya,
Of course. Please let us know when we can make this forum thread public, and we will do so.

You can also do this yourself in the following way:

  1. At the bottom of your first post, click on the “show more” button.
  2. Click on the “edit this post” button.
  3. Reset the “Private Topic” check box.
  4. Click on the “Save Edit” button.

Awesome. Thank you for the pointers.

Would you be able to delete the message with order ID? I’ll change this post to public after that.

Thank you,
@sudi.karmacharya

@sudi.karmacharya,

It’s done. The relevant post/reply by @andrey.potapov, where your order ID was mentioned, has been removed. You can now safely make the thread public.

1 Like