Upgraded to FluentValidation 10.x and .NET 6 Preview 3, getting the following error
See original GitHub issueError: System.MissingMethodException: Method not found: 'System.Collections.Generic.IList`1<FluentValidation.Results.ValidationFailure> FluentValidation.Results.ValidationResult.get_Errors()'.
at Microsoft.AspNetCore.Components.Forms.FluentValidator.ValidateModel(EditContext editContext, ValidationMessageStore messages)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Components.Forms.FluentValidator.ValidateModel(EditContext editContext, ValidationMessageStore messages)
at Microsoft.AspNetCore.Components.Forms.FluentValidator.<>c__DisplayClass24_0.<AddValidation>b__0(Object sender, ValidationRequestedEventArgs eventArgs)
at Microsoft.AspNetCore.Components.Forms.EditContext.Validate()
at Microsoft.AspNetCore.Components.Forms.EditForm.HandleSubmitAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:5
Top Results From Across the Web
10.0 Upgrade Guide — FluentValidation documentation
FluentValidation 10.0 is a major release that included several breaking changes. Please review this document carefully before upgrading from FluentValidation 9.
Read more >Error with NinjectValidatorFactory after updating ...
It looks as if the problem is that FluentValidation used to be a signed assembly but is now an unsigned assembly. Ninject.Web.
Read more >11.0 Upgrade Guide — FluentValidation documentation
FluentValidation 11.0 is a major release that included several breaking changes. Please review this document carefully before upgrading from FluentValidation 10 ...
Read more >Fluent Validation in ASP.NET Core – Complete Guide
You get Fluent Validation! With Fluent Validation, you can create complex validation rules using a process called “method chaining” or “fluent ...
Read more >FluentValidation — FluentValidation documentation
FluentValidation is a .NET library for building strongly-typed validation rules. FluentValidation 11 supports the following platforms: .NET Core 3.1 .NET 5 .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @ryanelian, I just wanted to weigh in and provide some context on the above. This happens because FV’s
ValidationResult.Errors
property was changed from anIList<ValidationFailure>
toList<ValidationFailure>
with the 10.0 release. The Accelist.FluentValidation.Blazor package doesn’t currently contain an upper version limit for its FluentValidation dependency, so nuget will allow users to upgrade from FV 9 to 10 without warning them there’s a compatibility issue.The fix in this case is just to recompile against FV 10, but I’d also suggest patching the current release to add an upper version limit too.
I’d suggest the following:
<PackageReference Include="FluentValidation" Version="[9.5.4,10.0)" />
<PackageReference Include="FluentValidation" Version="[10.0.4,11.0)" />
Please feel free to ping me if you have questions about upgrading to 10.0
@pablopioli You are a legend!!!