Skip to content

fix(build): pin EF Core major per TFM to avoid net10 binary break#9

Merged
mnbuhl merged 2 commits intomainfrom
fix/net10-efcore-binary-compat
Apr 25, 2026
Merged

fix(build): pin EF Core major per TFM to avoid net10 binary break#9
mnbuhl merged 2 commits intomainfrom
fix/net10-efcore-binary-compat

Conversation

@mnbuhl
Copy link
Copy Markdown
Owner

@mnbuhl mnbuhl commented Apr 25, 2026

Summary

  • Fixes MissingMethodException: IRelationalCommandBuilder.Append(string) on .NET 10 consumers. The provider assemblies were compiled against EF 8 (floor [8.0.0, )), where Append has a single string parameter; EF 9/10 added a second bool endOfLine parameter on the interface method, so the IL emitted against EF 8 no longer resolves at runtime.
  • Each library and test project now multi-targets net8.0;net9.0;net10.0 and pins the EF package version per TFM (bounded [N.0.0, {N+1}.0.0) ranges, or VersionOverride for CPM-enabled test projects). The net{N}.0 assembly shipped in the nupkg is therefore compiled against EF {N}.x, matching its runtime.
  • Pomelo.EntityFrameworkCore.MySql has no net10.0 build yet, so the MySql provider, its tests, and the benchmarks cap at net9.0. The test-mysql CI matrix trims to 8.0.x/9.0.x to match.

mnbuhl and others added 2 commits April 25, 2026 20:46
Consumers on .NET 10 hit MissingMethodException on
IRelationalCommandBuilder.Append(string) because the provider assemblies
were compiled against EF 8 (floor [8.0.0, )), where Append has a single
string parameter. EF 9/10 added a second bool parameter on the interface
method, so the IL emitted against EF 8 no longer resolves at runtime.

Each library and test project now multi-targets net8.0/net9.0/net10.0 and
pins the EF package version to the matching major via per-TFM ItemGroups
(or VersionOverride for CPM-enabled test projects). The compiled
assembly shipped for net{N}.0 is therefore built against EF {N}.x,
matching its runtime.

Pomelo.EntityFrameworkCore.MySql has no net10.0 build yet, so the MySql
provider, its tests, and the benchmarks cap at net9.0. The test-mysql CI
matrix is trimmed to 8.0/9.0 to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mnbuhl mnbuhl merged commit 12bc750 into main Apr 25, 2026
11 checks passed
@mnbuhl mnbuhl deleted the fix/net10-efcore-binary-compat branch April 25, 2026 18:52
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