Skip to content

Release v7.9.7

Choose a tag to compare

@github-actions github-actions released this 15 May 12:03
70b79d4

Enables AOT and trimmer analysis for the Fundamentals package by setting IsAotCompatible=true, then resolves all resulting IL warnings across all target frameworks (net8.0, net9.0, net10.0).

Added

  • <IsAotCompatible>true</IsAotCompatible> to Fundamentals.csproj, enabling IL2026/IL3050/IL2046/IL2057/IL2060/IL2067–IL2075/IL2087/IL2091/IL3051 static analysis

Changed

  • [RequiresDynamicCode] / [RequiresUnreferencedCode] added to non-virtual public methods that genuinely use MakeGenericType, MakeGenericMethod, Type.GetType(string), or runtime JSON reflection (TypeConversion.Convert, RegisterTypeConvertersForConcepts(Assembly), CountElements, GetKeyValuePairs)
  • [UnconditionalSuppressMessage] applied to JsonConverter.Read/Write and JsonConverterFactory.CreateConverter/CanConvert overrides — avoids IL2046/IL3051 cascade since base class signatures carry no matching annotations; both IL2070 and IL2071 suppressed since net8.0 emits IL2070 and net9.0/10.0 emits IL2071 for the same MakeGenericType patterns
  • [UnconditionalSuppressMessage] applied to BCL-interface reflection helpers (ImplementsOpenGeneric, GetEnumerableElementType, IsDictionary, GetKeyType, GetValueType, etc.) where interfaces are always runtime-preserved
  • [DynamicallyAccessedMembers(PublicConstructors)] added to TypeConstructorExtensions method parameters, consistent with their PublicConstructors access pattern
  • AddNamingPolicy<T> generic parameter annotated with [DynamicallyAccessedMembers(PublicConstructors)] to satisfy DI registration requirements
  • HasDefaultConstructor simplified to type.IsValueType || type.GetConstructors().Any(...), removing a [RequiresDynamicCode]-tagged call to GetTypeInfoDetails() while preserving value-type semantics