PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, August 5, 2022

[FIXED] What is the cause of FluentValidation Method Not Found exception?

 August 05, 2022     api-gateway, exception, fluentvalidation     No comments   

Issue

I've got a Domain Driven Design solution and for some reason, I'm getting this exception at RunTime when the API call is made through GateWay:

One or more errors occurred. (Method not found: 'Void FluentValidation.AbstractValidator`1.When(System.Func`2<!0,Boolean>, System.Action)'.)

The error occurs as below:

I have solution like this:

The main 4 project I'm focusing on right now are:

  1. Core.Model
  2. Account.Api
  3. Service.Api.Gateway
  4. Web.ClientSite

Web.ClientSite makes request to Service.Api.Gateway which then calls Account.Api. Note that Core.Model is referenced everywhere

VERY IMPORTANT: If I remove the reference of FluentValidation from Core.Model, the exception disappears.

I'm hoping these information is enough. Why do you think I'm getting this exception and how can I eliminate.


Solution

Looks like some of libs (ocelot) are incompatible with new changes in FluentValidation 8.1.2. Try to downgrade to FluentValidation before 8.1.2. Hope it helps



Answered By - Alexey.Petriashev
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing