Madan Shekar

Madan Shekar

  • 228
  • 8.3k
  • 1.2m

.Net Core 3.1 to 6.0 error in DistinctBy method.

Jun 9 2022 4:02 AM

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)