Open snill93 opened 6 years ago
I got the same issue
Hi @snill93, @Hobbes1987, Sorry for the late reply. The project currently doesn't support .Net Core, but I'll be working on that. I'll try to keep you guys posted. Cheers.
Hi @snill93, @Hobbes1987,
I created a pre-release package at NuGet.org with support for .Net Core. Would you mind checking that out and leaving a comment here to let me know if it's working correctly now?
Many thanks, David
An unhandled exception occurred while processing the request.
AmbiguousMatchException: Ambiguous match found. System.RuntimeType.GetMethodImplCommon(string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers)
TargetInvocationException: Exception has been thrown by the target of an invocation. System.RuntimeTypeHandle.CreateInstance(RuntimeType type, bool publicOnly, bool wrapExceptions, ref bool canBeCached, ref RuntimeMethodHandleInternal ctor)
TypeInitializationException: The type initializer for 'ExpressionBuilder.Helpers.OperationHelper' threw an exception. ExpressionBuilder.Helpers.OperationHelper..ctor()
filter.By(queryField.Field, ExpressionBuilder.Operations.Operation.Contains, queryField.Value);
Get the same exception with EqlausTo. .net core 2.2 in asp core project.
Same here for core 2.2 and equalsTo
@dbelmont no plans on improving support for .net core? I'm using the pre release and .net core 2.2
I've had the same issue. After debugging it seems the problem for me was a nuget package that didn't specify its dependencies. The nuget package that caused problems referenced another nuget package, but didn't actually use anything in that nuget package, causing our main project to not load in the "required" .dll or load in a different version of the .dll. The code used to fetch all types used in ExpressionBuilder (to initialize the operations) also searches for the types in the missing (or having an incorrect version) .dll, causing the exception.
Fixing the dependencies for that bad nuget package made ExpressionBuilder work again.
Either way, you should catch the System.Reflection.ReflectionTypeLoadException
if you're having problems and look what library is giving troubles.
I'm getting the same error
System.TypeInitializationException: The type initializer for 'ExpressionBuilder.Operations.Operation' threw an exception. ---> System.TypeInitializationException: The type initializer for 'ExpressionBuilder.Helpers.OperationHelper' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.AmbiguousMatchException: Ambiguous match found.
I'm using Xamarin Forms on IOS targeting .net standard 2.1 (tried 2.0 also to no avail)
It looks like this is already fixed in the repo. Could you push a new version to NuGet?
I'm trying to utilize the library in an ASP.NET Core 2.1 (preview) application but continue to get exceptions when running the following within a method in my data access layer / repository:
And when I run this line (from above):
ASP.NET Core crashes with the following:
Could you give me some help? Thanks in advice!