← All recipes
Moderne licensed

Find obsolete Queryable.MaxBy/MinBy with IComparer<TSource> (SYSLIB0061)

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FindQueryableMaxByMinByObsoleteArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Finds Queryable.MaxBy and Queryable.MinBy overloads taking IComparer<TSource> which are obsolete in .NET 10. Use the overloads taking IComparer<TKey> instead.

Single recipenet10linqsearchdotnetProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net10.FindQueryableMaxByMinByObsolete

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet