From b125d1622b89814f41dc308b36767dc0cb204831 Mon Sep 17 00:00:00 2001 From: zhangruochu Date: Mon, 30 Nov 2026 23:54:29 +0800 Subject: [PATCH 1/2] build(deps): pin ReactiveUI.Avalonia to the version AtomUI compiles against AtomUI.Desktop.Controls 6.3.x declares ReactiveUI.Avalonia 12.0.3, i.e. it is built against ReactiveUI 23.2.x where IViewFor lives in the ReactiveUI namespace. PR #8 (.NET 11 upgrade) moved the adapter to 12.1.9, which pulls ReactiveUI 28 and moved IViewFor to ReactiveUI.Binding, so AtomUI's IL references a type the shipped assembly no longer contains: crossgen2: Failed to load type 'ReactiveUI.IViewFor' That broke every ReadyToRun and NativeAOT publish, and left a latent TypeLoadException for any AtomUI path that touches the view locator. Pin the adapter back to AtomUI's declared dependency so both sides agree. Verified: build 0 warnings, 790/790 tests, R2R publish succeeds, app reaches the main window with Avalonia 12.2.0. --- CxShell.csproj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CxShell.csproj b/CxShell.csproj index e61fa14..23b56e7 100644 --- a/CxShell.csproj +++ b/CxShell.csproj @@ -73,7 +73,12 @@ - + + From eddaad3ac80daef0f4b7875c85fee7e4cb0753c7 Mon Sep 17 00:00:00 2001 From: zhangruochu Date: Mon, 30 Nov 2026 23:59:02 +0800 Subject: [PATCH 2/2] build(release): ship Windows builds as compressed ReadyToRun Now that ReactiveUI.Avalonia matches AtomUI, crossgen2 compiles the full dependency graph again, so the Windows artifact can be ReadyToRun. Measured on win-x64 (time from process start to a visible main window, warm cache, 4 runs): plain single-file 162.6 MB 4.14-4.23 s R2R single-file 313.2 MB 1.56-1.65 s R2R single-file + compression 127.0 MB 2.07-2.13 s Compression costs ~0.5 s at launch but keeps the artifact 22% smaller than the current release, so R2R + compression is the only variant that is both faster and smaller. Linux and macOS keep the plain publish for now: they publish a loose directory rather than a single file, where R2R grows the payload ~25% with no compression to claw it back. --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d3b881..cb955e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,6 +137,8 @@ jobs: /p:FileVersion=$assemblyVersion ` /p:InformationalVersion=$version ` /p:PublishSingleFile=true ` + /p:EnableCompressionInSingleFile=true ` + /p:PublishReadyToRun=true ` /p:IncludeNativeLibrariesForSelfExtract=true ` /p:DebugType=none ` /p:DebugSymbols=false