Fixed release builds 2

This commit is contained in:
Tig
2025-05-31 18:19:22 -06:00
parent 0df61a92cf
commit 27f5a2d2ba
3 changed files with 7 additions and 5 deletions

View File

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

View File

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

View File

@@ -56,9 +56,11 @@ public static class DeepCloner
// If in AOT but source generation failed, throw an exception // If in AOT but source generation failed, throw an exception
// instead of silently falling back to reflection // instead of silently falling back to reflection
throw new InvalidOperationException ( //throw new InvalidOperationException (
$"Type {typeof (T).FullName} is not properly registered in SourceGenerationContext " + // $"Type {typeof (T).FullName} is not properly registered in SourceGenerationContext " +
$"for AOT-compatible cloning."); // $"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 // Use reflection-based approach, which should have better performance in non-AOT environments