Skip to content

Add .NET 11 (RC 1) support - #93

Merged
koenbeuk merged 6 commits into
mainfrom
feat/net11
Sep 20, 2026
Merged

koenbeuk merged 6 commits into
mainfrom
feat/net11

Conversation

@koenbeuk

@koenbeuk koenbeuk commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

Adds the net11.0 target with EF Core 11.0.0-rc.1.26425.128 (go-live license) wired in through the repo's per-TFM VersionOverride convention.

Important

Draft until dotnet/efcore#38977 gets clarity. EF Core 11 removed the QuerySqlGenerator fallback that the window functions' self-rendering relied on (dotnet/efcore#37533), with no provider-agnostic replacement. The RelationalExtensions + RelationalExtensions.Abstractions packages therefore do not target net11.0 — EF Core 11 is unsupported for them until EF restores an extension point (window-function users on .NET 11 can stay on EF Core 10, which runs fine on the .NET 11 runtime). Every other package ships net11.0.

Changes

  • TFM: net8.0;net9.0;net10.0;net11.0 in Directory.Build.props; the two RelationalExtensions projects override back to net8.0;net9.0;net10.0 with a comment pointing at EF 11 regression: QuerySqlGenerator now throws for third-party SqlExpressions dotnet/efcore#38977. LangVersion stays 14.0 and Roslyn stays 5.0.0 (no consumer minimum-SDK change; C# 15 revisited at GA)
  • EF package: net11.0 VersionOverride row pinning 11.0.0-rc.1.26425.128; NoWarn NU5104 on ExpressiveSharp.EntityFrameworkCore so stable packs accept the go-live RC dependency (remove at EF 11 GA)
  • Provider gating: replaced the brittle != 'net10.0' conditions with PomeloMySqlSupported / NpgsqlSupported allow-list properties — Pomelo (no EF 10/11 release) and Npgsql (only 11.0.0-preview.1, incompatible with rc.1) are compiled out on net11.0 and revisited at GA; extension-member test exclusion now uses IsTargetFrameworkCompatible
  • RelationalExtensions on net11.0: test projects gate on a new RelationalExtensionsSupported property — project references, window-function tests, and the RelationalExtensions unit tests are excluded on net11.0, and the shared test factories fall back to plain UseExpressives(); documented in docs/guide/window-functions.md
  • Generator tests: Basic.Reference.Assemblies.Net110 + a NET11_0_OR_GREATER branch in GeneratorTestBase; all Verify snapshots unchanged (generator still compiles with the pinned Roslyn 5.0.0)
  • CI/release: separate setup-dotnet step for the 11.0.x RC SDK (dotnet-quality: preview, kept apart so 8/9/10 keep resolving GA); Cosmos TFM loop extended; devcontainer gains SDK 11
  • Docs: stale TFM/SDK/C# references refreshed in CLAUDE.md, quickstart, and testing-strategy

Verification

  • dotnet build -c Release: 0 warnings under TreatWarningsAsErrors, all TFMs
  • dotnet test -c Release: 3981/3981 green
  • -p:TestDatabase=All builds cleanly with Pomelo/Npgsql compiled out on net11.0
  • Stable-version pack rehearsal succeeds: ExpressiveSharp.EntityFrameworkCore carries a net11.0 dependency group on EF 11.0.0-rc.1.26425.128; the RelationalExtensions nuspec has exactly net8.0/net9.0/net10.0 groups and no prerelease dependency
  • samples/EFCoreSample runs on net11.0

Follow-ups at EF 11 GA

Swap the rc.1 pin for stable, drop the NU5104 NoWarn, re-enable Npgsql (and Pomelo if released), fold SDK 11 into the main CI blocks, add net11.0 back to the RelationalExtensions packages once dotnet/efcore#38977 resolves (dropping the RelationalExtensionsSupported gates), and consider LangVersion 15 + a Roslyn bump.

🤖 Generated with Claude Code

koenbeuk and others added 3 commits September 13, 2026 00:14
- net11.0 TFM across all packages; EF Core 11.0.0-rc.1.26425.128 via
  per-TFM VersionOverride (src, integration tests, sample)
- NoWarn NU5104 on the two EF packages so stable packs accept the
  go-live RC dependency; remove at EF 11 GA
- Rework exact-TFM conditions that broke on net11.0: Pomelo gating
  (PomeloMySqlSupported), new NpgsqlSupported gate (no EF 11-compatible
  Npgsql release yet), extension-member test exclusion via
  IsTargetFrameworkCompatible
- Generator tests: Basic.Reference.Assemblies.Net110 + NET11_0_OR_GREATER
  branch in GeneratorTestBase; snapshots unchanged
- CI/release: separate setup-dotnet step for the 11.0.x RC SDK
  (dotnet-quality: preview), Cosmos TFM loop extended; devcontainer
  installs SDK 11
- EF Core 11 limitation: window functions other than RowNumber throw
  NotSupportedException on net11.0 - EF 11 removed the QuerySqlGenerator
  VisitChildren fallback that WindowFunctionSqlExpression's self-rendering
  relied on (dotnet/efcore#37533, tracked in dotnet/efcore#38977).
  RowNumber and indexed Select keep working; affected tests gated,
  limitation documented

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…xtension point

EF Core 11 is now unsupported for the RelationalExtensions packages instead
of shipping a net11.0 asset whose window functions throw:

- RelationalExtensions + RelationalExtensions.Abstractions no longer target
  net11.0 (dotnet/efcore#37533 removed the QuerySqlGenerator VisitChildren
  fallback; no replacement hook — tracked in dotnet/efcore#38977)
- Revert the net11-only NotSupportedException guard in
  WindowFunctionMethodCallTranslator (dead code without the TFM) and the
  test gates in WindowFunctionTestBase
- Test projects gate on a RelationalExtensionsSupported property: project
  references and window-function/RelationalExtensions test files are
  excluded on net11.0; test factories fall back to plain UseExpressives()
- RelationalExtensions no longer needs the NU5104 suppression (no
  prerelease dependency left)
- Docs: window-functions guide and CLAUDE.md now state EF Core 11 is
  unsupported and recommend EF Core 10 on .NET 11 for window functions

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The .NET 11 RC SDK's dotnet test (Microsoft.Testing.Platform runner)
resolves a relative --project path against the project's own directory,
doubling it (tests/X/tests/X/X.csproj) and failing before any test runs.
Use absolute paths in ci.yml and test-containers.sh; verified the exact
invocation (incl. --report-trx/--coverage) against 11.0.100-rc.1 locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Six CommonScenario projection tests fail on the Cosmos provider only on
net11.0, all reproduced with vanilla EF Core 11.0.0-rc.1 (no ExpressiveSharp
involved): constructor and interpolated-string projections throw "A part of
the projection was undefined" when they include a JSON-null value or mix the
key property with a coalesced member, and string-concat projections of int
properties fail shaper compilation with an invalid int -> string Convert
(ShaperProcessingExpressionVisitor.ReadJsonValue). Root cause is EF 11's
rewritten System.Text.Json Cosmos shaper; the same queries pass on EF Core
8/9/10 Cosmos and every relational provider.

Follow the existing Cosmos convention: override the affected tests with
Assert.Inconclusive under #if NET11_0_OR_GREATER (base methods made virtual).
Revisit at EF 11 GA.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@koenbeuk
koenbeuk marked this pull request as ready for review September 20, 2026 02:48
Copilot AI lite review requested due to automatic review settings September 20, 2026 02:48
…ere users land

The full explanation lived only in the window-functions guide. Add a warning
to the window-functions recipe (self-contained setup instructions), an
"EF Core 11 is not supported" subsection to the limitations page (including
the NuGet nearest-TFM fallback pitfall), a note in the EF Core integration
guide's ExecuteUpdate section, and "(EF Core 8-10)" qualifiers to the package
tables in README, quickstart, and the docs landing page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

It spans multi-target packaging, CI/release changes, and an EF Core RC with intentionally unsupported relational paths, requiring final human validation.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds .NET 11 RC support across packages, tests, CI, release workflows, and documentation while excluding relational extensions until EF Core restores the required SQL-generation hook.

Changes:

  • Adds net11.0 targeting and EF Core 11 RC package pins.
  • Gates unsupported providers and relational-extension tests.
  • Updates CI, packaging, samples, development environment, and documentation.
File Description
Directory.Build.props Adds the net11.0 target.
Directory.Packages.props Adds .NET 11 reference assemblies.
src/​ExpressiveSharp.EntityFrameworkCore/​ExpressiveSharp.EntityFrameworkCore.csproj Adds EF Core 11 RC support.
src/​ExpressiveSharp.EntityFrameworkCore.RelationalExtensions/​ExpressiveSharp.EntityFrameworkCore.RelationalExtensions.csproj Excludes net11.0.
src/​ExpressiveSharp.EntityFrameworkCore.RelationalExtensions.Abstractions/​ExpressiveSharp.EntityFrameworkCore.RelationalExtensions.Abstractions.csproj Excludes net11.0.
samples/​EFCoreSample/​EFCoreSample.csproj Adds EF Core 11 SQLite support.
tests/​ExpressiveSharp.Tests/​ExpressiveSharp.Tests.csproj Gates relational-extension tests.
tests/​ExpressiveSharp.IntegrationTests/​ExpressiveSharp.IntegrationTests.csproj Updates extension-member target gating.
tests/​ExpressiveSharp.Generator.Tests/​ExpressiveSharp.Generator.Tests.csproj Adds .NET 11 reference assemblies.
tests/​ExpressiveSharp.Generator.Tests/​Infrastructure/​GeneratorTestBase.cs Selects .NET 11 reference metadata.
tests/​ExpressiveSharp.EntityFrameworkCore.IntegrationTests/​ExpressiveSharp.EntityFrameworkCore.IntegrationTests.csproj Adds provider and relational-extension gating.
tests/​ExpressiveSharp.EntityFrameworkCore.IntegrationTests/​Infrastructure/​TestContextFactories.cs Uses non-relational configuration on .NET 11.
tests/​ExpressiveSharp.EntityFrameworkCore.IntegrationTests/​Infrastructure/​CommonScenarioTestBase.cs Enables Cosmos test overrides.
tests/​ExpressiveSharp.EntityFrameworkCore.IntegrationTests/​Tests/​Cosmos/​CommonScenarioTests.cs Skips known EF Core 11 Cosmos regressions.
test-containers.sh Uses an absolute test-project path.
.github/​workflows/​ci.yml Adds .NET 11 SDK and test coverage.
.github/​workflows/​release.yml Adds .NET 11 SDK for release builds.
.devcontainer/​devcontainer.json Installs the .NET 11 SDK.
README.md Documents EF Core 8–10 window-function support.
docs/​index.md Updates feature and package support ranges.
docs/​guide/​window-functions.md Documents EF Core 11 limitations.
docs/​recipes/​window-functions-ranking.md Adds an EF Core 11 warning.
docs/​guide/​quickstart.md Updates supported SDK versions.
docs/​guide/​integrations/​ef-core.md Documents relational-extension compatibility.
docs/​advanced/​testing-strategy.md Updates CI SDK documentation.
docs/​advanced/​limitations.md Documents EF Core 11 relational limitations.
CLAUDE.md Refreshes architecture and target-framework guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/ExpressiveSharp.Tests/ExpressiveSharp.Tests.csproj Outdated
NpgsqlSupported and RelationalExtensionsSupported used != 'net11.0', so a
future TFM would silently enable them without matching package references.
Enumerate the supported TFMs explicitly, matching the PomeloMySqlSupported
convention.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@koenbeuk
koenbeuk merged commit 6707778 into main Sep 20, 2026
11 checks passed
@koenbeuk
koenbeuk deleted the feat/net11 branch September 20, 2026 03:22
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.

2 participants