Skip to content

Exception: No coercion operator is defined between types 'System.Void*' and 'System.Object'. #7

Description

@heischo

Hi.

I get this exception when I try to clone the object 'NLog.LogManager.Configuration' of type NLog.Config.LoggingConfiguration.
I use the nuget version 2.2.2 in a .NET Core 3.1 project (Console App).

Stack Trace:

   at System.Linq.Expressions.Expression.GetUserDefinedCoercionOrThrow(ExpressionType coercionType, Expression expression, Type convertToType)
   at System.Linq.Expressions.Expression.Convert(Expression expression, Type type, MethodInfo method)
   at System.Linq.Expressions.Expression.Convert(Expression expression, Type type)
   at ObjectCloner.Internal.DeepCloneExpressionBuilder.CreateRecursiveCallExpression(Expression objectToCopy)
   at ObjectCloner.Internal.DeepCloneExpressionBuilder.<CreateFieldCopyExpressions>d__19.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
   at ObjectCloner.Internal.DeepCloneExpressionBuilder.Build()
   at ObjectCloner.Internal.DeepCloneInternal.<>c__DisplayClass1_0.<GetDeepCloner>b__0(Type t)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at ObjectCloner.Internal.DeepCloneInternal.GetDeepCloner(Type type)
   at ObjectCloner.ObjectCloner.DeepClone[T](T original)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions