Tig 3 місяців тому
батько
коміт
27f5a2d2ba

+ 1 - 1
Examples/NativeAot/NativeAot.csproj

@@ -13,7 +13,7 @@
   </ItemGroup>
 
   <ItemGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-	  <ProjectReference Include="..\..\Terminal.Gui\Terminal.Gui.csproj" />
+    <PackageReference Include="Terminal.Gui" />
     <TrimmerRootAssembly Include="Terminal.Gui" />
   </ItemGroup>
 

+ 1 - 1
Examples/SelfContained/SelfContained.csproj

@@ -16,7 +16,7 @@
   </ItemGroup>
 
   <ItemGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-	  <ProjectReference Include="..\..\Terminal.Gui\Terminal.Gui.csproj" />
+    <PackageReference Include="Terminal.Gui" />
     <TrimmerRootAssembly Include="Terminal.Gui" />
   </ItemGroup>
 

+ 5 - 3
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