-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Description
I use EPPlus for export data as Excel files. Currently, System.Drawwing.Common is not supported for net6 applications runing under linux (as a docker image).
Here is the exception
//inner exception
"ClassName" : "System.TypeInitializationException",
"Message" : "The type initializer for 'Gdip' threw an exception.",
"Source" : "System.Drawing.Common",
"StackTraceString" : """ 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 OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth, Double MaximumWidth)
-----
//actual exception
"ClassName" : "System.PlatformNotSupportedException",
"Message" : "System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.",
"Source" : "System.Drawing.Common",
"StackTraceString" : """ at System.Drawing.LibraryResolver.EnsureRegistered()
at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
at System.Drawing.SafeNativeMethods.Gdip..cctor()""",
This was working on net5.
Is there a way to fix this?
Thanks.
RafiHenig
Metadata
Metadata
Assignees
Labels
No labels