Skip to content

Release v7.32.0

Choose a tag to compare

@github-actions github-actions released this 01 Nov 18:39
32c38e3

Summary

Enum JSON converters now work in NativeAOT applications. The TypeDiscovery source generator creates the converters for the enums each assembly declares, so EnumConverterFactory no longer needs run-time generic instantiation under AOT. Applications that support dynamic code behave as before.

Added

  • ICanCreateEnumConverters: generated type discovery providers implement it to create EnumConverter<TEnum> for the enums their assembly declares. Hand-written providers can implement it to cover enums from assemblies built without the generator (#1237)

Fixed

  • EnumConverterFactory no longer throws NotSupportedException ("EnumConverter1[...] is missing native code or metadata") under NativeAOT for enums declared in assemblies compiled with the TypeDiscovery generator. Assemblies must be rebuilt with this version. For enums from other assemblies, add new EnumConverter()toJsonSerializerOptions.Converters` (#1237)