Due to a breaking change in version 10 of FluentValidation, which changed the return type of ValidationResult.Errors from an IList<ValidationFailure> to a List<ValidationFailure>, and the validation pipeline was compiled against the version 9, an MissingMethodException will be thrown:
System.MissingMethodException: Method not found: 'System.Collections.Generic.IList`1<FluentValidation.Results.ValidationFailure> FluentValidation.Results.ValidationResult.get_Errors()'.
at SimpleSoft.Mediator.ValidationPipeline.ValidateInstanceAsync[T](T instance, CancellationToken ct)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at SimpleSoft.Mediator.ValidationPipeline.ValidateInstanceAsync[T](T instance, CancellationToken ct)
at SimpleSoft.Mediator.ValidationPipeline.OnCommandAsync[TCommand,TResult](Func`3 next, TCommand cmd, CancellationToken ct)
Without breaking changes in the validation library, the only plausible solution is to reference version 10 and recompile.
Due to a breaking change in version 10 of
FluentValidation
, which changed the return type ofValidationResult.Errors
from anIList<ValidationFailure>
to aList<ValidationFailure>
, and the validation pipeline was compiled against the version 9, anMissingMethodException
will be thrown:Without breaking changes in the validation library, the only plausible solution is to reference version 10 and recompile.