26.7.2
26.7.2 — Revert the GDI+ resolver added in 26.7.1 (regression)
What changed
- Removed
GdiPlusResolverand itsGdiPlusResolver.Register()call fromProgram.cs. This reverts the change shipped in 26.7.1. - Bumped the MCP package version from 26.7.1 to 26.7.2, including
.mcp/server.json(bothversionfields).
Why
26.7.1 registered a DllImportResolver on System.Drawing.Common to map gdiplus.dll to libgdiplus. That was wrong on two counts and made Linux strictly worse:
-
Wrong assembly.
SetDllImportResolveris per-declaring-assembly. Thegdiplus.dllP/Invoke is declared inSystem.Private.Windows.Core(System.Drawing.Common 9.x's CsWin32 interop layer), not inSystem.Drawing.Common— so the resolver was never consulted for the failing load. -
It broke the type initializer.
System.Drawing.Commonregisters its own resolver inside theSystem.Drawing.Gdipstatic constructor. Because 26.7.1 claimed that slot first, Gdip's cctor threwInvalidOperationException: A resolver is already set for the assembly, which escaped the type initializer and disabled System.Drawing entirely:TypeInitializationException: Windows.Win32.PInvoke → TypeInitializationException: System.Drawing.Gdip → InvalidOperationException: A resolver is already set for the assembly
Reverting restores the pre-26.7.1 behaviour on Linux (see the known limitation below). Windows was unaffected throughout — the resolver was a no-op there.
Known limitation — compare / analyze_changes on Linux and macOS
Verified by reproducing the failure in a linux/amd64 container against engine 26.5.0:
libgdiplusloads fine; the library was never missing. .NET probes onlygdiplus.dll(.so)/libgdiplus.dll(.so)and never plainlibgdiplus.so.- On
net10.0the engine resolvesGroupDocs.Comparison.Net100, which depends on System.Drawing.Common 9.0.3. That package is Windows-only since .NET 7 — with the DllImport correctly resolved it simply throwsPlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. - Neither adding
Aspose.Drawingnor retargeting tonet8.0(GroupDocs.Comparison.Net80→ System.Drawing.Common 8.0.0) avoids it; both fail the same way.
So comparing two different documents — which renders marked-up output — cannot work on non-Windows with engine 26.5.0. Comparing identical documents, and get_document_info, are unaffected. This is an upstream engine limitation, not something the MCP layer can work around; it needs GroupDocs.Comparison to migrate its render path off System.Drawing.Common (as GroupDocs.Metadata already has, via Aspose.Drawing).
The inert System.Drawing.EnableUnixSupport runtime flag is retained only as a marker; it has been a no-op since System.Drawing.Common 7.0.
Migration / impact
Drop-in replacement for 26.7.1, and the recommended upgrade from it. No tool-name, input-schema, or response-shape changes. Windows behaviour is unchanged; Linux/macOS return the original System.Drawing error instead of the resolver-conflict error.
Full Changelog: 26.7.1...26.7.2