System.Drawing was deprecated on .NET 6 and there does not seem to be a replacement ready from Aspose for macOS and Linux.
I have attached a test project which fails completely on macOS, and partially on Linux.
On macOS libgdiplus is used internally and cannot be found.
We are currently using .NET 5 in our production code and cannot upgrade to .NET 6 only because of Aspose. We are paying a lot for the Aspose.Total license and expect that this should be fixed a.s.a.p
AsposeTestApp.zip (756.2 KB)
Output on macOS:
Aspose.Cells failed with exception: System.TypeInitializationException: The type initializer for ‘’ threw an exception.
**---> System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.**
**---> System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibgdiplus, 1): image not found**
**at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)**
**at System.Drawing.SafeNativeMethods.Gdip..cctor()**
**--- End of inner exception stack trace ---**
**at System.Drawing.SafeNativeMethods.Gdip.GdipStringFormatGetGenericTypographic(IntPtr& format)**
**at System.Drawing.StringFormat.get_GenericTypographic()**
**at ..cctor()**
**--- End of inner exception stack trace ---**
**at Aspose.Cells.Workbook.Save(String fileName, SaveOptions saveOptions)**
**at Aspose.Cells.Workbook.Save(String fileName, SaveFormat saveFormat)**
**at TestApp.TestAsposeCells() in /Users/mk/Documents/repos/projects/atlas-ti/AsposeTestApplication/AsposeTestApp/Program.cs:line 27**
**❌ Aspose.Cells test failed.**
**Aspose.Drawing failed with exception: Aspose.Imaging.CoreExceptions.ImageLoadException: Image loading failed.**
**---> System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.**
**---> System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibgdiplus, 1): image not found**
**at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)**
**at System.Drawing.SafeNativeMethods.Gdip..cctor()**
**--- End of inner exception stack trace ---**
**at System.Drawing.SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(IntPtr& fontfamily)**
**at System.Drawing.FontFamily.GetGdipGenericSansSerif()**
**at System.Drawing.FontFamily.get_GenericSansSerif()**
**at System.Drawing.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)**
**at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)**
**at System.Drawing.Font..ctor(String familyName, Single emSize, String systemName)**
**at System.Drawing.SystemFonts.get_DefaultFont()**
**at Aspose.Imaging.ImageOptionsBase..ctor()**
**at Aspose.Imaging.ImageOptions.JpegOptions..ctor()**
**at Aspose.Imaging.FileFormats.Jpeg.JpegImage.(IRasterImageArgb32PixelLoader , Int32 , Int32 )**
**at Aspose.Imaging.FileFormats.Jpeg.JpegImage..ctor(Int32 , Int32 , PixelFormat , IRasterImageArgb32PixelLoader)**
**at Aspose.Imaging.FileFormats.Jpeg.JpegImage.(Int32 , Int32 , PixelFormat , IRasterImageArgb32PixelLoader)**
**at .(StreamContainer , LoadOptions , )**
**at .Load(StreamContainer , LoadOptions )**
**at Aspose.Imaging.Image.(StreamContainer , LoadOptions )**
**--- End of inner exception stack trace ---**
**at Aspose.Imaging.Image.(StreamContainer , LoadOptions )**
**at Aspose.Imaging.Image.Load(String filePath)**
**at TestApp.TestAsposeImaging() in /Users/mk/Documents/repos/projects/atlas-ti/AsposeTestApplication/AsposeTestApp/Program.cs:line 67**
**❌ Aspose.Imaging test failed.**
**Aspose.PDF or Aspose.Slides failed with exception: System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.**
**---> System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibgdiplus, 1): image not found**
**at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)**
**at System.Drawing.SafeNativeMethods.Gdip..cctor()**
**--- End of inner exception stack trace ---**
**at System.Drawing.SafeNativeMethods.Gdip.GdipCreateRegion(IntPtr& region)**
**at System.Drawing.Region..ctor()**
**at #=zvOvOCvAZdP9GKJbmjgz$R3n0SyW1lQkIDg==.#=zFXNUONI=(#=zgNo5e0c9gHO8iAzPeGDDCCmDofqueD3xBg== #=zipu5u0o=)**
**at #=zBfVGVJP1ImTF2VMm51lpZn3sdXAWZEBsAZEeCIg=.Clone()**
**at #=znY0mL9L8ZXHn6zoXHjR4epGJ2nT$IeqDq9igD88=.#=z$x796Lk=()**
**at #=zX3wLNV33MSef95lWrnGG8PD3VGNkDOq1RvkslOI=.#=z$x796Lk=()**
**at #=zFLKHFi4q9yQT1s7qN9F3Pjy$o8eM.#=zN6Su7Bt4x59b()**
**at #=zO_v9jFVLPvhndS6E25XjW2_VhVcTYwj$hhd2W8bIPtlf.#=zN6Su7Bt4x59b()**
**at #=zO_v9jFVLPvhndS6E25XjW2_VhVcTYwj$hhd2W8bIPtlf.#=zU$FPplMDcrxH()**
**at #=zO_v9jFVLPvhndS6E25XjW2_VhVcTYwj$hhd2W8bIPtlf.#=zyxshG1k=()**
**at #=z0aJDmtQnP84snmHpgfuK6128xiUdtBMsm81XOxDKPYWF.#=zueCMkwI=(#=zKis5YHRVAFmKO3SRk38yhTIyu03K #=zsO4AC6o=, #=zq4EcwWUNU5$UAcJIvUU02vVp$_UGREkusA== #=zBI5F_R8=, #=zNk3AsTPFQ2EkegyDfWuwqwSXIpIdz6AxXxvgTT55MKFI #=zncHgIAs=)**
**at Aspose.Pdf.Page.CalculateContentBBox()**
**at Aspose.Pdf.Page.#=z4GzPgR4=(Page #=zBI5F_R8=)**
**at Aspose.Pdf.Document.ProcessParagraphs()**
**at Aspose.Pdf.Document.#=zHSU7TJ1r2p51(Stream #=zrzqVF2Y=, SaveOptions #=zZd9LooIUKdl_)**
**at Aspose.Pdf.Document.#=zB20ZmbtNdN0B(String #=zzO$7SyTN6dm8)**
**at Aspose.Pdf.Document.Save(String outputFileName)**
**at TestApp.TestAsposePDFAndSlides() in /Users/mk/Documents/repos/projects/atlas-ti/AsposeTestApplication/AsposeTestApp/Program.cs:line 122**
**❌ Aspose.PDF test failed.**
Output on Linux (Ubuntu 20.04 LTS):
Aspose.Cells passed
Aspose.Imaging passed.
Aspose.PDF or Aspose.Slides failed with exception: System.ArgumentNullException: Value cannot be null. (Parameter ‘key’)
at System.Collections.Generic.Dictionary2.FindValue(TKey key) at System.Collections.Generic.Dictionary
2.TryGetValue(TKey key, TValue& value)
at #=zImCMOVW4Q3GzTpxMJPnysqY_Hem_y9_Ssw==.#=zP2De2SY=(#=zHIIHG70= #=zSMrJg1s=)
at #=zCeoPH_KffNVGf_181UtpTifkgttwVyxTfg==.#=zVOvOV2BhWode.#=z_0dLgp58IWeE(#=zHIIHG70= #=zSMrJg1s=, #=zGcJUKFM=& #=zIGoo4fI=)
at #=zy_TdDmgrkspggfsImFtYtlPt2sKkiUouJD7fAKo=.#=zjM9iwv46Yvm8(#=zFmA20cmyVm5QZ$0jFMrqaP3Ohjh1 #=zApgLdk7MrIle)
at #=zO_v9jFVLPvhndS6E25XjW2_VhVcTYwj$hhd2W8bIPtlf.#=zU$FPplMDcrxH()
at #=zO_v9jFVLPvhndS6E25XjW2_VhVcTYwj$hhd2W8bIPtlf.#=zyxshG1k=()
at #=z0aJDmtQnP84snmHpgfuK6128xiUdtBMsm81XOxDKPYWF.#=zueCMkwI=(#=zKis5YHRVAFmKO3SRk38yhTIyu03K #=zsO4AC6o=, #=zq4EcwWUNU5$UAcJIvUU02vVp$UGREkusA== #=zBI5F_R8=, #=zNk3AsTPFQ2EkegyDfWuwqwSXIpIdz6AxXxvgTT55MKFI #=zncHgIAs=)
at Aspose.Pdf.Page.CalculateContentBBox()
at Aspose.Pdf.Page.#=z4GzPgR4=(Page #=zBI5F_R8=)
at Aspose.Pdf.Document.ProcessParagraphs()
at Aspose.Pdf.Document.#=zHSU7TJ1r2p51(Stream #=zrzqVF2Y=, SaveOptions #=zZd9LooIUKdl)
at Aspose.Pdf.Document.#=zB20ZmbtNdN0B(String #=zzO$7SyTN6dm8)
at Aspose.Pdf.Document.Save(String outputFileName)
at TestApp.TestAsposePDFAndSlides() in /home/devops/Dokumente/AsposeTestApplication/AsposeTestApp/Program.cs:line 122
Aspose.PDF test failed.