WL#17281: Add support for .NET 11

Affects: Connector/.NET-26.x   —   Status: Complete

This worklog adds conditional Connector/NET support for .NET 11 and EF Core 11 preview or release-candidate versions, including a prerelease MySql.EntityFrameworkCore package. The solution is generic and allows builds using a preview version of .NET; it is initially configured for .NET 11 preview, which is the support required by this worklog.

Direct dotnet project and solution commands include .NET 11 only when IncludePreviewTargetFrameworks=true is specified.

FUNCTIONAL REQUIREMENTS

  • FR1 - Connector/NET must support building and testing against one configured preview .NET target. The initial configuration must support .NET 11 and the corresponding EF Core 11 preview or release-candidate versions.

    • FR1.1 - When preview targeting is enabled, MySql.Data and MySql.EntityFrameworkCore must produce net11.0 assemblies. The provider assembly must be compatible with the selected EF Core 11 package versions.
    • FR1.2 - When preview targeting is enabled, MySql.Data.Tests, MySqlX.Data.Tests, and the EF Core basic, design, and migrations test projects must build and execute on net11.0.
  • FR2 - A prerelease MySql.EntityFrameworkCore NuGet package compatible with the selected EF Core 11 preview or release-candidate versions must be produced and published.

NON-FUNCTIONAL REQUIREMENTS

  • NFR1 - Direct project and solution invocations must default IncludePreviewTargetFrameworks to false when the property is omitted.

  • NFR2 - The implementation must assess .NET 11 and EF Core 11 compatibility across provider APIs, target-framework conditional code, build and test tooling, packaging, and runtime behavior. It must add or update focused regression tests for affected behavior.

    • The assessment must validate existing NET*_OR_GREATER branches and EF Core public and internal API integration.
  • Visual Studio development with the current preview

    • Enable preview SDK use in Visual Studio. Update the repository-root global.json to select a compatible .NET 11 preview or release-candidate SDK and set allowPrerelease to true.
    • Before launching Visual Studio, set the environment variable IncludePreviewTargetFrameworks=true. Launch Visual Studio from that environment so it inherits the setting, then open the solution.
    • Visual Studio uses the repository-root global.json to select the SDK.
  • .NET 11 general availability

    • Make net11.0 unconditional in the affected projects, replace prerelease dependencies and package metadata with GA versions, and update the repository-root global.json to the .NET 11 GA SDK with prerelease disabled.

Project and compatibility changes

Add conditional net11.0 targeting to:

  • MySQL.Data/src/MySql.Data.csproj
  • MySQL.Data/tests/MySql.Data.Tests/MySql.Data.Tests.csproj
  • MySQL.Data/tests/MySqlX.Data.Tests/MySqlX.Data.Tests.csproj
  • EFCore/src/MySql.EntityFrameworkCore.csproj
  • EFCore/tests/MySql.EFCore.Basic.Tests/MySql.EntityFrameworkCore.Basic.Tests.csproj
  • EFCore/tests/MySql.EFCore.Design.Tests/MySql.EntityFrameworkCore.Design.Tests.csproj
  • EFCore/tests/MySql.EFCore.Migrations.Tests/MySql.EntityFrameworkCore.Migrations.Tests.csproj

Extend target-framework conditions for net8.0, net9.0, and net10.0 so net11.0 receives the same required source exclusions and references. Add EF Core 11 package-reference groups for Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.Relational, Microsoft.EntityFrameworkCore.Relational.Specification.Tests, and Microsoft.Extensions.Logging.Abstractions. Add NET11_0 version metadata.

Resolve compatibility changes discovered through compilation and testing, including EF Core type-mapping API changes and .NET 11 RSA encryption API obsolescence, while preserving existing authentication behavior.

Add a CHANGES entry stating that Connector/NET supports the selected .NET 11 and EF Core 11 preview or release-candidate versions.