Skip to content

Remove Xamarin Forms from windows build - #3821

Open
meee1 wants to merge 9 commits into
ArduPilot:masterfrom
meee1:ccr-fad59d5e-ire1ur
Open

meee1 wants to merge 9 commits into
ArduPilot:masterfrom
meee1:ccr-fad59d5e-ire1ur

Conversation

@meee1

@meee1 meee1 commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@meee1
meee1 requested a balanced review from Copilot October 14, 2026 00:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

4 open findings
What changed in this PR

Removes Xamarin.Forms dependencies from the Windows build by deleting Xamarin references/projects and replacing the Xamarin-based firmware selection UI with a WinForms implementation.

Changes:

  • Removed Xamarin.Forms/Xamarin.Essentials references (projects, packages, and related helper/using code).
  • Replaced the Xamarin firmware selection dialog with a new WinForms FirmwareSelectionForm.
  • Added a new FirmwareFilter faceted-filter utility plus MSTest coverage.
File Description
Utilities/​ExtensionsMP.cs Removes Xamarin WinForms renderer helper and related usings.
Program.cs Avoids Xamarin.Essentials usage in non-LIB builds; keeps desktop font scaling config.
Plugins/​example23-switch.cs Removes Xamarin.Forms platform configuration import.
GCSViews/​ConfigurationView/​ConfigFirmwareManifest.cs Switches firmware selection UX from Xamarin page to WinForms form.
MissionPlanner.csproj Drops Xamarin.Forms/Xamarin.Essentials package references and WinForms platform project reference.
MissionPlanner.sln Removes Xamarin.Forms.Platform.WinForms project from the solution.
ExtLibs/​Xamarin/​Xamarin/​Xamarin.csproj Removes old linked test XAML file and updates embedded-resource generator mapping.
ExtLibs/​Strings/​Strings.resx Adds localized strings for the new firmware selection form.
ExtLibs/​ArduPilot/​FirmwareFilter.cs Adds new faceted filtering implementation for firmware manifest entries.
Controls/​FirmwareSelectionForm.cs Adds WinForms UI for selecting firmware via filters and a results grid.
MissionPlannerTests/​ArduPilot/​FirmwareFilterTests.cs Adds unit tests for firmware filtering/options behavior.
Files not reviewed (1)
  • ExtLibs/Strings/Strings.Designer.cs: Generated file

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Controls/FirmwareSelectionForm.cs Outdated

if (knownDevice)
{
var platform = device.Value.board.Replace("-BL", "");
Comment on lines +21 to +23
BoardId,
BootloaderStr
}
Comment on lines +82 to +83
return values.OrderBy(a => { Version v; return Version.TryParse(a, out v) ? v : new Version(); })
.ThenBy(a => a, StringComparer.Ordinal).ToList();
Comment thread ExtLibs/ArduPilot/FirmwareFilter.cs Outdated
Comment on lines +119 to +123
return fw.Usbid ?? new string[0];
case Field.BoardId:
return new[] { fw.BoardId.ToString() };
case Field.BootloaderStr:
return fw.BootloaderStr ?? new string[0];
Pure filtering logic extracted from the Xamarin FirmwareSelection page so it
can be unit tested and reused by a WinForms replacement. Options for each
field are computed from the other fields' selections, so a choice can be
widened again, and the format filter is now applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCrzU8rJurW3DPH4UAvTWR
FirmwareSelectionForm uses FirmwareFilter to offer faceted dropdowns and a
results grid (platform, vehicle, release type, version, format, file) instead
of raw URLs. Detected boards keep the existing simplified view: platform is
preselected and only platform/release type/version filters are shown, the
latter two only when there is a choice. The "all options" path now shows
every filter rather than hiding them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCrzU8rJurW3DPH4UAvTWR
The page is now only used by the Android/Xamarin Firmware screen, which
already linked it. Move it beside that screen and drop the WinForms hosting
helper ShowXamarinControl, so the shared root sources no longer use
Xamarin.Forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCrzU8rJurW3DPH4UAvTWR
- drop the Xamarin.Forms/Xamarin.Essentials packages and the
  Xamarin.Forms.Platform.WinForms project reference from MissionPlanner.csproj
- remove Xamarin.Forms.Platform.WinForms from MissionPlanner.sln; the folder
  stays, as MissionPlannerLib compiles it for the Android/Mac apps
- Program.cs: desktop always resolved to Desktop/Unknown idiom, so disable
  ZedGraph font scaling directly; keep the Essentials check under LIB
- example23-switch: remove an unused Xamarin using that would fail to compile
  at runtime once the assembly is no longer shipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCrzU8rJurW3DPH4UAvTWR
DataGridView selects its first row when shown, which enabled Upload before
the user had chosen. Also let the prompt wrap on narrow windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCrzU8rJurW3DPH4UAvTWR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XoULMVVcPGs6rvDkA6FAyN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XoULMVVcPGs6rvDkA6FAyN
…here is a choice

The "all options" path passes the whole manifest for every detected port,
so a known board could list every vehicle type with no way to filter by it.
On the normal path the list is already one vehicle type, so nothing changes
there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XoULMVVcPGs6rvDkA6FAyN
- FirmwareSelectionForm: a board in its bootloader reports <platform>-BL;
  strip only that suffix instead of every -BL in the name
- FirmwareFilter: use Array.Empty<string>() for missing UsbId/BootloaderStr
- FirmwareFilterTests: cover BootloaderStr options and matching, including
  entries with no or null bootloader strings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XoULMVVcPGs6rvDkA6FAyN
@meee1
meee1 force-pushed the ccr-fad59d5e-ire1ur branch from 2b3f7df to 1df0a88 Compare October 20, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants