question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AspNetCore 9.0.0 'GetValidationVisitor' in type 'FluentValidation.AspNetCore.FluentValidationObjectModelValidator' does not have an implementation

See original GitHub issue

Which version of FluentValidation are you using? FluentValidation.AspNetCore 9.0.0 in an AspNet Core 3.1 project and FluentValidation 9.0.0 in a Netstandard 2.1 project.

Which version of ASP.NET are you using? API Project with AspNet Core 3.1 referencing a project with Netstandard 2.1. This is due to the use of Blazor in a seperate project which we want to be able to share code with the server. The Blazor Project uses Netstandard 2.1.

Describe the issue that you’re having The following exception is thrown during startup of the API-Project.

System.TypeLoadException: 'Method 'GetValidationVisitor' in type 'FluentValidation.AspNetCore.FluentValidationObjectModelValidator' from assembly 'FluentValidation.AspNetCore, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7de548da2fbae0f0' does not have an implementation.'

I am aware that it states the version 8.0.0.0 even though I am sure it should state 9.0.0.0 since it is not an 8.x release. However this is what it seems to load.

I have tried manually purging the nuget packages as well as deleteing all “bin” and “obj” folders in the Project and restoring the packages after. This to make sure I am not having an older package version around that is conflicting (unless I have overlooked another possible source where it could have been loaded from)

Downgrading all FluentValidation(.*) to 8.6.2 in all projects fixes the issue. However we would like to use the latest and greatest 9.0.0 version 😛 So to be clear this issue isn’t time critical to us but I am putting this information/report out there in case it helps you or other users of this package diagnose future issues. I tried upgrading all to 9.0.0 again after this but then I am getting the same error again.

Any Ideas / Help / Fixes for this?

Regards Lukas

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
JeremySkinnercommented, Jul 14, 2020

No worries, glad you got it sorted

1reaction
LukasWillincommented, Jul 14, 2020

So you were right it was me at fault.

I completely overlooked that the API-Project was “Asp.Net Core 3.0” not “Asp.Net Core 3.1”. I must have just looked at the number 3 and adding a 1 to it in my mind since I looked at this information a bunch. Upgrading to Asp.Net Core 3.1 resolves the issue. As the update notes state 3.0 support has been removed. Rightfully so.

Thank you for taking time out of your day to help me out. I must apologise for having overlooked that particular but not less important detail.

I close the issue now.

Kind regards Lukas

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dotnet Core 3.1 Upgrade error - Method ...
The problem was automatically solved by upgrading the FluentValidation.AspNetCore to it's latest version.
Read more >
FluentValidation.AspNetCore 11.3.0
Version Downloads Last updated 11.3.0 3,575,050 5 months ago 11.2.2 12,077,057 9/8/2022 11.2.1 2,582,700 8/9/2022
Read more >
8.0 Upgrade Guide — FluentValidation documentation
FluentValidation 8.0 is a major release that included several breaking changes. Please review this document before upgrading from FluentValidation 7.x to 8.
Read more >
Fluent Validation in ASP.NET Core 3.1 - no dogma blog
Full source code available here. This is an update to a post I wrote in 2017 talking about Fluent Validation in ASP.NET Core....
Read more >
Using Fluent Validation in ASP.NET Core
In this article, we will talk about Fluent Validation and its implementation in ASP.NET Core Applications. We will discuss the preferred alternative to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found