From a4b35473602fdb2326cbcf08023f24026337c0ae Mon Sep 17 00:00:00 2001 From: Cassiano Date: Thu, 8 Oct 2026 22:11:40 -0400 Subject: [PATCH] patch(local): default-enable System.Drawing.EnableUnixSupport for .NET (Core) consumers Not proposed upstream (yet) - this is a local-fork patch, kept independent of the upstream review/merge cycle per our own CI PR backlog finding (oldest open PR there is from 2024). FastReport's engine is built on System.Drawing.Common/GDI+ (see the _FR_GraphicsEngine=GDIPlus property right above this change). Since .NET 6, that package throws PlatformNotSupportedException on any non-Windows host unless an app-level AppContext switch is set - every consumer of the official package hits that exception on Linux with zero indication why, since nothing in this repo sets or documents the switch. This patches the NuGet build-props shipped inside the FastReport.OpenSource package (Pack/FastReport.OpenSource/build/FastReport.OpenSource.props) to set RuntimeHostConfigurationOption System.Drawing.EnableUnixSupport=true for any .NETCoreApp consumer, transitively, with no action required on the consumer's part. No-op on Windows. Does NOT fix the deeper issue: Linux hosts still need libgdiplus installed natively for GDI+ calls to actually succeed once the exception is gone. Validated locally end-to-end (packed to a local feed, consumed from a throwaway console app, compared runtimeconfig.json against the official 2026.2.8 package from nuget.org): official package -> configProperties has no System.Drawing.EnableUnixSupport key patched package -> configProperties["System.Drawing.EnableUnixSupport"] = true --- .../build/FastReport.OpenSource.props | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Pack/FastReport.OpenSource/build/FastReport.OpenSource.props b/Pack/FastReport.OpenSource/build/FastReport.OpenSource.props index 4547d33d..234c9a49 100644 --- a/Pack/FastReport.OpenSource/build/FastReport.OpenSource.props +++ b/Pack/FastReport.OpenSource/build/FastReport.OpenSource.props @@ -7,4 +7,17 @@ <_FRProductTypeWithEngine>$(_FRProductType).$(_FR_GraphicsEngine) + + + + + \ No newline at end of file