Skip to content

Support EF Core 11 (1.1.0) - #3

Merged
hlib-zinchenko merged 1 commit into
mainfrom
net11-target
Nov 13, 2026
Merged

hlib-zinchenko merged 1 commit into
mainfrom
net11-target

Conversation

@hlib-zinchenko

Copy link
Copy Markdown
Owner

Why

EF Core 11 changed IReadOnlyIndex.Properties from IReadOnlyList<IReadOnlyProperty> to a list of IReadOnlyPropertyBase, because an index can now hold a JSON complex property. An EF Core 11 app on 1.0.0 gets the net10.0 build, which throws when it builds any model that has an index:

System.MissingMethodException: Method not found: 'System.Collections.Generic.IReadOnlyList`1<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyIndex.get_Properties()'.

What changes

  • Fix: ModelIdentifiers and NoRedundantIndexesRule now take index members as IEnumerable<IReadOnlyPropertyBase>. MR014 leaves out any index that holds a non-scalar member, rather than guessing at its columns.
  • net11.0 target: builds against EF Core Relational 11.0.0, the minimum version its dependency group requires.
  • Tests on net11.0:
    • Providers: SqlServer and Sqlite 11.0.0, Npgsql 11.0.0-rc.3 and Oracle MySQL 11.0.0-preview. The prerelease providers are test-only and never packed.
    • NU1608 is suppressed in the test project, because Npgsql's rc requires exactly EF Core rc.3.
    • New tests: an index on a JSON complex property (MR014 skips it, and MR009 still checks its name), and a redundant index on a property inside a complex type.
  • CI and release: both workflows install the .NET 11 SDK. The integration job needs it too, because the .NET 10 SDK can't restore the library's net11.0 target (NETSDK1045).
  • Docs and version: README, CLAUDE.md and the comments mention EF Core 11, and Version is 1.1.0.

Verified

  • 663 tests pass, covering net8.0, net9.0, net10.0 and net11.0.
  • The net11.0 build doesn't compile without the fix.
  • A scratch net11.0 app on EF Core 11.0.0 crashes with 1.0.0 from nuget.org and builds its model with the 1.1.0 pack.
  • The pack contains lib/net8.0 through lib/net11.0.

🤖 Generated with Claude Code

…yIndex.Properties

EF Core 11 changed IReadOnlyIndex.Properties to a list of IReadOnlyPropertyBase, since an index
can now hold a JSON complex property. 1.0.0's net10.0 build, loaded by an EF Core 11 app, threw
MissingMethodException whenever it built a model with an index. Index members are now taken as
IEnumerable<IReadOnlyPropertyBase>, and an index holding a non-scalar member is left out of the
MR014 comparison.

Tests run on net11.0 with SqlServer, Sqlite, Npgsql (rc) and Oracle MySQL (preview); CI and the
release workflow install the .NET 11 SDK. Version 1.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hlib-zinchenko
hlib-zinchenko merged commit 09273ea into main Nov 13, 2026
2 checks passed
@hlib-zinchenko
hlib-zinchenko deleted the net11-target branch November 13, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant