Skip to content

Target .NET 11 and EF Core 11 preview for an 11.0.0-preview.1 release - #440

Draft
renemadsen with Copilot wants to merge 44 commits into
net11from
copilot/dotnet-11-support
Draft

renemadsen with Copilot wants to merge 44 commits into
net11from
copilot/dotnet-11-support

Conversation

Copilot AI commented Sep 7, 2026

Copy link
Copy Markdown

Tracks .NET 11 support: brings the branch in line with master and retargets everything to .NET 11 / EF Core 11 preview so an 11.0.0-preview.1 package can be published (npgsql/efcore.pg preview releases used as reference).

Build & dependencies

  • global.json: SDK 11.0.100-preview.7.26381.103, allowPrerelease: true
  • Directory.Build.props: all target frameworks → net11.0 (MySqlConnector.DependencyInjection stays net8.0); benchmark and sample projects retargeted
  • Directory.Packages.props: EF Core range [11.0.0-preview.7.26381.103,11.0.999], Microsoft.Extensions / ASP.NET Core / BCL packages → 11.0.0-preview.7.26381.103, Roslyn packages → 5.3.0 (required by Microsoft.EntityFrameworkCore.Design 11)
  • NuGet.config: source mapping for Microsoft.DotNet.XUnitV3Extensions, which EF Core 11's specification-test package pulls in and is only published on the dotnet-eng feed
  • Version.props11.0.0-preview.1; dotnet-tools.jsondotnet-ef 11.0.0-preview.7

Provider changes for EF Core 11 API breaks

  • MySqlModelValidator: ValidateStoredProcedures is now invoked per entity type; ValidateJsonEntities was removed upstream (the override was a pass-through)
  • MySqlHistoryRepository: HistoryRepository.EnsureModel is now protected virtual, so the custom implementation overrides it instead of shadowing it — the workaround region can eventually be reduced further
  • MySqlStructuralJsonTypeMapping: JsonTypeMapping is obsolete/emptied; base changed to StructuralJsonTypeMapping
  • MySqlJsonTableExpression / MySqlQueryableMethodTranslatingExpressionVisitor: TableValuedFunctionExpression.Arguments and Update now use Expression rather than SqlExpression
  • MySqlBoolOptimizingExpressionVisitor: SqlExpressionVisitor was removed, so it derives from ExpressionVisitor and dispatches the SQL node types itself:
public class MySqlBoolOptimizingExpressionVisitor : ExpressionVisitor
{
    protected override Expression VisitExtension(Expression extensionExpression)
        => extensionExpression switch
        {
            ColumnExpression columnExpression => VisitColumn(columnExpression),
            SqlBinaryExpression sqlBinaryExpression => VisitSqlBinary(sqlBinaryExpression),
            // ... remaining SQL node types
            _ => base.VisitExtension(extensionExpression),
        };
}

Docs

  • README compatibility table gains an 11.0.0-preview.1 row

Known gap

The test projects are not migrated to xUnit v3, which EF Core 11's specification-test assemblies now require (xunit.v3 packages, Microsoft.Testing.Platform, [ConditionalFact][Fact]). That migration is sizeable and could not be attempted here — the sandbox cannot reach the dotnet-eng package CDN, so the test projects don't even restore. Verification was limited to building/packing src, benchmark, samples, tools and exercising the provider against MySQL 8.0.40 (create/insert/query, ExecuteUpdate, owned-entity and complex-collection ToJson, history repository script generation).

Copilot AI linked an issue Sep 7, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits September 7, 2026 06:34
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Copilot AI changed the title [WIP] Update to support .NET 11 in Pomelo.EntityFrameworkCore.MySql Target .NET 11 and EF Core 11 preview for an 11.0.0-preview.1 release Sep 7, 2026
Copilot AI requested a review from renemadsen September 7, 2026 06:44
Comment thread Version.props
<PreReleaseVersionIteration></PreReleaseVersionIteration>
<VersionPrefix>11.0.0</VersionPrefix>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be 7, to align with:

<EFCoreVersion>[11.0.0-preview.7.26381.103,11.0.999]</EFCoreVersion>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot take this into consideration, so we are inline with the EF Core release numbering for the preview

…firewall

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Copilot AI and others added 2 commits September 14, 2026 10:11
…es, fix xUnit v3 attribute conflicts

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…xtra primitive-collections enablement

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Copilot AI and others added 3 commits September 15, 2026 09:43
…ines in rewrite workflow

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…Core NRE fix

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…1 model changes

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Copilot AI and others added 4 commits September 17, 2026 04:44
…aining MySQL failures

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…ntax

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…timizer

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Copilot AI and others added 4 commits September 17, 2026 07:02
…sertion

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
… rewrite baselines on both servers

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…ry point

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
- JsonTypes: convert the two ulong enum theories from `new`/implicit
  hiding to real overrides so the inherited InlineData cases (notably
  UInt64.MaxValue) are actually suppressed rather than still executed.
  The nullable overload's base parameter is `object`, not `EnumU64?`.
- BulkUpdates: skip Update_Where_Skip[_Take]_set_constant, which use
  LIMIT/OFFSET without ORDER BY. The latter previously carried an
  inverted SupportedServerVersionCondition("0.0.0-mysql") that ran it
  only on the server where it is unreliable.
- GroupBy_Select_Anonymous_Type_With_Entire_Entity: skip unconditionally;
  it also fails on several MariaDB versions, not just MySQL.
- ToListAsync_can_be_canceled: drop the fixed AssertSql baseline, since
  the statement count depends on when cancellation happens.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…e.yml

The IntegrationTests project's launchSettings.json sets
`commandLineArgs: "testMigrate"`, which is one of the commands its
Program.Main recognizes. Under the Microsoft.Testing.Platform runner,
`dotnet test` applies the default launch profile, so the test host was
started with `testMigrate` and ran the migration routine instead of the
MTP server. The runner then reported "Zero tests ran", a handshake
failure and exit code 5.

pr-build.yml was already fixed; build.yml and release.yml carry the same
four integration-test steps and were missed, so pushes to the branch
(which run build.yml) still failed. Only the IntegrationTests project has
a launchSettings.json, so the functional and unit test steps are
unaffected.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
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.

.Net 11 support

3 participants