Skip to content

SqlKata's Humanizer.Core version is incompatible with later versions (affecting compatibility with .NET 5 EF and other assemblies) #435

@jwstadler

Description

@jwstadler

I am working on a project that includes SqlKata and EF Core and during our upgrade to .NET 5, we have encountered an issue related to an incompatibility in versions of Humanizer. After upgrading, I am encountering the following error when I attempt to execute a query:

System.MissingMethodException: Method not found: 'System.String Humanizer.InflectorExtensions.Singularize(System.String, Boolean)'.
   at SqlKata.Execution.QueryFactory.handleIncludes[T](Query query, IEnumerable`1 result)
   at SqlKata.Execution.QueryFactory.Get[T](Query query, IDbTransaction transaction, Nullable`1 timeout) in C:\Projects\querybuilder\SqlKata.Execution\QueryFactory.cs:line 85
   at SqlKata.Execution.QueryExtensions.Get[T](Query query, IDbTransaction transaction, Nullable`1 timeout) in C:\Projects\querybuilder\SqlKata.Execution\Query.Extensions.cs:line 12
   at SqlKata.Execution.QueryExtensions.Get(Query query, IDbTransaction transaction, Nullable`1 timeout) in C:\Projects\querybuilder\SqlKata.Execution\Query.Extensions.cs:line 22
  ...

It appears that Microsoft.EntityFrameworkCore.Design requires Humanizer.Core >= 2.8.26. while SqlKata.Execution requires Humanizer.Core >= 2.6.2

Humanizer.Core broke version compatibility between these two versions (see Humanizr/Humanizer#1013) so the 2.6.2 version that SqlKata was built against is not compatible with the version used by Microsoft.EntityFrameworkCore.Design. When the 2.8.26 version is selected, the above exception is thrown.

Updating SqlKata locally to the latest version of Humanizer appears to resolve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions