Skip to content

fix(devserver): bridge cross-major AssemblyRef requests in host (backport #23287 + #23308) - #23638

Merged
dr1rrb merged 3 commits into
release/stable/6.6from
dev/dr/backport66devSrv
Jul 3, 2026
Merged

dr1rrb merged 3 commits into
release/stable/6.6from
dev/dr/backport66devSrv

Conversation

@dr1rrb

@dr1rrb dr1rrb commented Jul 3, 2026

Copy link
Copy Markdown
Member

GitHub Issue: fixes unoplatform/uno.rider#489, fixes unoplatform/uno.studio#1027 — parent tracking issue unoplatform/uno-private#1968

PR Type:

  • 🐞 Bugfix

What is the current behavior? 🤔

On a .NET 9-only machine, the DevServer host (Uno.UI.RemoteControl.Host) from the 6.6 servicing line crash-loops at startup with exit code -532462766:

System.IO.FileNotFoundException: Could not load file or assembly
'System.Text.Encodings.Web, Version=8.0.0.0, ...'
   at Microsoft.Kiota.Serialization.Json.KiotaJsonSerializationContext..cctor()
   ...
   at Uno.Licensing.Sdk.Client.LicensingServiceClient..ctor(...)

The licensing add-in (Uno.Settings.DevServer.dll, net9.0) carries the net8.0 build of Microsoft.Kiota.Serialization.Json (Kiota 1.22.2 ships no net9.0 TFM), whose strict AssemblyRef to System.Text.Encodings.Web 8.0.0.0 cannot be satisfied: the host's default AssemblyLoadContext only carries the v9 copy from the shared framework, and on release/stable/6.6 add-ins are loaded with a bare Assembly.LoadFrom — the cross-major bridging that fixes this on master (PRs #23287 / #23308) was never backported.

As a result the DevServer cannot start on .NET 9-only hosts from any IDE integration, even though the CLI launch path itself works.

What is the new behavior? 🚀

Backport of the net effect of #23287 + #23308 (two cherry-picks, -m 1, in merge order):

  • HostAssemblyResolution.Install() runs first thing in Program.Main: registers an AssemblyLoadContext.Default.Resolving bridge (TryBridgeBySimpleName — same simple name, requested version ≤ loaded version, matching PKT for signed refs) and eager-loads System.* / Microsoft.Extensions.* OOB assemblies from the host directory.
  • Add-ins are loaded into the single default ALC (with the UNO_DEVSERVER_DISABLE_ADDIN_ALC kill switch and cross-add-in type sharing preserved), matching the shipping design on master.
  • Brings the regression coverage along: Given_HostAssemblyResolution, the AddInWithCrossMajorVersionRefs / shared-contract fixtures, the add-in version-alignment test project, and the Linux DevServer CI test stage.

With this, the v8 System.Text.Encodings.Web request from the licensing add-in binds to the v9/v10 copy already loaded, and the host starts on .NET 9-only machines.

PR Checklist ✅

Please check if your PR fulfills the following requirements:

Other information ℹ️

…ontext

fix(devserver): isolate add-ins in a custom AssemblyLoadContext
fix(devserver): load add-ins into a single ALC for cross-add-in type sharing
@github-actions github-actions Bot added the area/build Categorizes an issue or PR as relevant to build infrastructure label Jul 3, 2026
@dr1rrb
dr1rrb marked this pull request as ready for review July 3, 2026 16:17
@unodevops

Copy link
Copy Markdown
Contributor

Runner images picked up a Homebrew version that refuses formulas from
third-party taps until explicitly trusted, breaking every iOS UI test
stage overnight:

  Error: Refusing to load formula facebook/fb/idb-companion from
  untrusted tap facebook/fb.

Trust only the idb-companion formula (least privilege), with tap-level
trust as fallback and a no-op on older brews that have no trust command.
Also document what this script does and where idb comes from
(sha256-pinned facebook/idb v1.1.8 artifact; tap dormant since 2022).
@dr1rrb

dr1rrb commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Heads-up: this branch now carries a cherry-pick of #23640 (ci(ios): trust the facebook/fb tap formula required by newer Homebrew, commit 297f876) — the iOS UI test stages were failing on every build since the runner images picked up the new Homebrew tap-trust gating, which was masking this PR's actual results.

Once #23640 is merged on master and backported to release/stable/6.6, that commit becomes redundant here and can be dropped on a rebase if preferred — it no-ops harmlessly otherwise.

@unodevops

Copy link
Copy Markdown
Contributor

@dr1rrb
dr1rrb enabled auto-merge July 3, 2026 19:26
@dr1rrb
dr1rrb merged commit 639ab8a into release/stable/6.6 Jul 3, 2026
63 of 64 checks passed
@dr1rrb
dr1rrb deleted the dev/dr/backport66devSrv branch July 3, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants