2
Answers

.Net Core 3.1 to 6.0 error in DistinctBy method.

Madan Shekar

Madan Shekar

2y
2.8k
1

Hello evryone, 

After upgrading CF project 3.1 to 6.0 [target framework] getting following exception in LINQ query.
error is occurring in .DistinctBy method.Error CS0121 The call is ambiguous between the following methods or properties: 'System.Linq.Enumerable.DistinctBy<TSource, TKey>(System.Collections.Generic.IEnumerable<TSource>, System.Func<TSource, TKey>)' and 'Core.Extensions.IEnumerableExtensions.DistinctBy<TSource, TKey>(System.Collections.Generic.IEnumerable<TSource>, System.Func<TSource, TKey>)'.

please let us know workaround for this issue.

Answers (2)