From 27f5a2d2baba7a604940e6e58b0e035142799b4e Mon Sep 17 00:00:00 2001 From: Tig Date: Sat, 31 May 2025 18:19:22 -0600 Subject: [PATCH] Fixed release builds 2 --- Examples/NativeAot/NativeAot.csproj | 2 +- Examples/SelfContained/SelfContained.csproj | 2 +- Terminal.Gui/Configuration/DeepCloner.cs | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Examples/NativeAot/NativeAot.csproj b/Examples/NativeAot/NativeAot.csproj index 3fe5b18e2..928c003f3 100644 --- a/Examples/NativeAot/NativeAot.csproj +++ b/Examples/NativeAot/NativeAot.csproj @@ -13,7 +13,7 @@ - + diff --git a/Examples/SelfContained/SelfContained.csproj b/Examples/SelfContained/SelfContained.csproj index 1fa6cfc92..c7f907753 100644 --- a/Examples/SelfContained/SelfContained.csproj +++ b/Examples/SelfContained/SelfContained.csproj @@ -16,7 +16,7 @@ - + diff --git a/Terminal.Gui/Configuration/DeepCloner.cs b/Terminal.Gui/Configuration/DeepCloner.cs index abdb01ef9..ab0699582 100644 --- a/Terminal.Gui/Configuration/DeepCloner.cs +++ b/Terminal.Gui/Configuration/DeepCloner.cs @@ -56,9 +56,11 @@ public static class DeepCloner // If in AOT but source generation failed, throw an exception // instead of silently falling back to reflection - throw new InvalidOperationException ( - $"Type {typeof (T).FullName} is not properly registered in SourceGenerationContext " + - $"for AOT-compatible cloning."); + //throw new InvalidOperationException ( + // $"Type {typeof (T).FullName} is not properly registered in SourceGenerationContext " + + // $"for AOT-compatible cloning."); + Logging.Error ($"Type {typeof (T).FullName} is not properly registered in SourceGenerationContext " + + $"for AOT-compatible cloning."); } // Use reflection-based approach, which should have better performance in non-AOT environments