From 2c99c5c775f071c4da4150c9efa22eea40c28a97 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 15:23:15 +0000 Subject: [PATCH 1/2] Initial plan From d46105769c4a3ce50bce37ccc5f977fb1bb4ff9d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 15:32:15 +0000 Subject: [PATCH 2/2] Fix NativeAOT NullReferenceException in GNOME views by preserving non-public fields for reflection Co-authored-by: nlogozzo <17648453+nlogozzo@users.noreply.github.com> Agent-Logs-Url: https://github.com/NickvisionApps/Application/sessions/236a2817-ce25-4a8f-813a-5f89c86b0623 --- Nickvision.Application.GNOME/Views/MainWindow.cs | 2 ++ Nickvision.Application.GNOME/Views/PreferencesDialog.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Nickvision.Application.GNOME/Views/MainWindow.cs b/Nickvision.Application.GNOME/Views/MainWindow.cs index 6782fc04..bd2996c9 100644 --- a/Nickvision.Application.GNOME/Views/MainWindow.cs +++ b/Nickvision.Application.GNOME/Views/MainWindow.cs @@ -10,6 +10,7 @@ using Nickvision.Desktop.GNOME.Helpers; using Nickvision.Desktop.Notifications; using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; namespace Nickvision.Application.GNOME.Views; @@ -43,6 +44,7 @@ public MainWindow(IServiceProvider serviceProvider, MainWindowController control } + [DynamicDependency(DynamicallyAccessedMemberTypes.NonPublicFields, typeof(MainWindow))] private MainWindow(IServiceProvider serviceProvider, MainWindowController controller, AppInfo appInfo, IEventsService eventsService, ITranslationService translationService, Gtk.Builder builder) : base(new Adw.Internal.ApplicationWindowHandle(builder.GetPointer("root"), false)) { var application = serviceProvider.GetRequiredService(); diff --git a/Nickvision.Application.GNOME/Views/PreferencesDialog.cs b/Nickvision.Application.GNOME/Views/PreferencesDialog.cs index a7b0b81f..24d912b6 100644 --- a/Nickvision.Application.GNOME/Views/PreferencesDialog.cs +++ b/Nickvision.Application.GNOME/Views/PreferencesDialog.cs @@ -2,6 +2,7 @@ using Nickvision.Application.Shared.Models; using Nickvision.Desktop.GNOME.Helpers; using System; +using System.Diagnostics.CodeAnalysis; namespace Nickvision.Application.GNOME.Views; @@ -20,6 +21,7 @@ public PreferencesDialog(PreferencesViewController controller, IGtkBuilderFactor } + [DynamicDependency(DynamicallyAccessedMemberTypes.NonPublicFields, typeof(PreferencesDialog))] private PreferencesDialog(PreferencesViewController controller, Gtk.Builder builder) : base(new Adw.Internal.PreferencesDialogHandle(builder.GetPointer("root"), false)) { _controller = controller;