Xamarin.Forms reached end-of-life in May 2024, and .NET MAUI offers no GTK backend, leaving Linux desktop users without a migration path. This post details a maintenance fork of Xamarin.Forms 5.0.0 that strips everything except the GTK platform backend, retargets it to .NET 10, migrates tests from NUnit to xUnit v3, and publishes packages under the Net4x. prefix on NuGet. Key engineering decisions covered include: pruning all non-GTK platform projects to eliminate untestable dead code, handling optional native dependencies (WebKitGTK, OpenGL) via runtime degradation rather than build-time switches, a custom GTK test harness (GtkTestHost) with hard-won rules around event-loop pumping and Xvfb quirks, and MSBuild tripwires that turn previously silent packaging bugs into hard build failures. The post is candid about scope — it is not a replacement for MAUI on mobile — but argues the fork is genuinely useful for existing Forms codebases needing a Linux desktop target or a modern SDK while a MAUI migration proceeds.
Table of contents
IntroductionWhat Was Removed, and Why That Is the PointHow a Forms Control Becomes a GTK WidgetTwo Native Dependencies, Handled at Runtime Instead of Build TimeGetting StartedMaps Without an API KeyTesting a UI Framework That Actually DrawsBuild and CIPackaging: Where the Real Bugs HidShould You Use It?Summary5.6K Impressions1 Comment