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.

AmbiguousMatchException problem

See original GitHub issue

Hello @dbelmont, I have a problem, can you please check that.

It keeps giving me an AmbiguousMatchException

Steps to produce

  • Add LambdaExpressionBuilder nuget packages. It is important to use nuget package. It does not give any error when I try it with using project reference. Tried nuget package versions: 2.0.1, 2.1.0-rc,

  • Try to create a simple filter, for example: (Tried on .netcore3.1)

public class TestClass
{
    public int Id { get; set; }
}

class Program
{
    static void Main(string[] args)
    {
        var filter = new Filter<TestClass>();
        filter.By("Id", Operation.EqualTo, 1);// that line gives an error as seen below
    }
}

image

System.TypeInitializationException
  HResult=0x80131534
  Message=The type initializer for 'ExpressionBuilder.Operations.Operation' threw an exception.
  Source=ExpressionBuilder
  StackTrace:
   at ExpressionBuilder.Operations.Operation.get_EqualTo()
   at test.Program.Main(String[] args) in D:\GitHub\ExpressionBuilder\test\Program.cs:line 16

  This exception was originally thrown at this call stack:
    [External Code]

Inner Exception 1:
TypeInitializationException: The type initializer for 'ExpressionBuilder.Helpers.OperationHelper' threw an exception.

Inner Exception 2:
TargetInvocationException: Exception has been thrown by the target of an invocation.

Inner Exception 3:
AmbiguousMatchException: Ambiguous match found.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

4reactions
Akinzekeelcommented, Jul 15, 2020

I found & fixed the problem but I screwed up the pull request. Perhaps somebody else can replicate my changes and do it properly.

In the meantime (because I needed a working version of this package), you may try my fork https://www.nuget.org/packages/Akinzekeel.ExpressionBuilder/

0reactions
josemojenacommented, Jul 15, 2020

Thanks, it worked like a charm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I getting AmbiguousMatchException: The request ...
When running the app, I get the error Microsoft.AspNetCore.Routing.Matching.AmbiguousMatchException: The request matched multiple endpoints
Read more >
Type: System.Reflection.AmbiguousMatchException
Initializes a new instance of the AmbiguousMatchException class with a specified error message and a reference to the inner exception that is the...
Read more >
NET 6.0 - AmbiguousMatchException ...
From your description, it sounds like the issue is inheritance. API Versions are not inherited out-of-the-box. This is by design. You cannot ...
Read more >
the request matched multiple endpoints
NET MVC app I am getting following error: AmbiguousMatchException: The request matched multiple endpoints. Matches: RockWorld.Web.
Read more >
What causes an AmbiguousMatchException
If your getting this error it probably means is that you have a case where it can't decide which overload to use in...
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