Skip to content

v1.0.0-beta.4

Pre-release
Pre-release

Choose a tag to compare

@StevenTCramer StevenTCramer released this 06 Dec 10:11
fa7f887

What's Changed

AOT and Trim Compatibility (Issue #7)

  • Add [DynamicallyAccessedMembers] attributes to eliminate IL2104/IL3053 warnings
  • Add [RequiresUnreferencedCode] and [RequiresDynamicCode] attributes for transparent AOT support on configuration-binding overload
  • Mark assembly as AOT-compatible (IsAotCompatible) and trimmable (IsTrimmable)
  • Remove AOT warning suppressions from Directory.Build.props

Notes

The AddFluentValidatedOptions<TOptions, TValidator>(IConfiguration) overload that uses configuration binding has inherent AOT limitations due to Microsoft's Bind<T>() using reflection. The attributes transparently communicate this to consumers.

For full AOT support, consumers can:

  1. Use EnableConfigurationBindingGenerator in their projects
  2. Use the AddFluentValidatedOptions<TOptions, TValidator>(Action<TOptions>) overload which is fully AOT-compatible

Full Changelog: v1.0.0-beta.3...v1.0.0-beta.4