Skip to content

Conversation

@arika0093
Copy link
Owner

@arika0093 arika0093 commented Nov 15, 2025

This pull request updates the project to support .NET 10 and improves compatibility with older .NET versions by targeting .NET Standard 2.0 for the main library. It also updates documentation to clarify prerequisites and adds PolySharp for enabling newer C# features on older frameworks. Test and example projects are updated to use .NET 10, and unnecessary test code and dependencies are removed.

Platform and Framework Updates:

  • Changed the main library (Linqraft) to target .NETStandard2.0 instead of .NET 8.0, increasing compatibility with older .NET versions. [1] [2] [3] [4]
  • Updated all CI workflows (release.yaml, release-github.yaml, test.yaml) and example projects to use .NET 10.0 (and in tests, also .NET 6.0 and .NET 8.0). [1] [2] [3] [4] [5] [6]
  • Updated NuGet dependencies in example projects to use the latest major versions compatible with .NET 10. [1] [2]

Documentation and Compatibility:

  • Improved English and Japanese README files to clarify that C# 12 is required, and added instructions for using PolySharp to enable C# 12 features on .NET 7 and below, including an example project file snippet. [1] [2]

Testing Improvements:

  • Updated test project configuration to target multiple frameworks (net6.0, net8.0, net10.0, and net48 on Windows), and added PolySharp as a test dependency to enable C# 12 features on older frameworks. [1] [2]
  • Removed unnecessary test dependencies and deleted the UseEFCoreSenarioTest file, which contained in-memory EF Core scenario tests. [1] [2]

Dependency Management:

  • Updated the packages.lock.json to reflect new dependencies and compatibility with .NETStandard2.0, including transitive dependencies required for .NET Standard support. [1] [2]

Summary by CodeRabbit

  • Documentation

    • Clarified requirement for C# 12+ with guidance for older frameworks and added concrete install command.
  • Chores

    • CI and build updated to target .NET 10, test matrix added across multiple .NET versions and OSes; project targets and package constraints adjusted; build metadata updated.
  • Tests

    • Removed EF Core integration tests and associated test-only data/models and dependencies.

@coderabbitai
Copy link

coderabbitai bot commented Nov 15, 2025

Warning

Rate limit exceeded

@arika0093 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 48 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3814b0a and 7c69dc9.

📒 Files selected for processing (3)
  • .github/workflows/release-github.yaml (2 hunks)
  • .github/workflows/release.yaml (2 hunks)
  • .github/workflows/test.yaml (2 hunks)

Walkthrough

CI workflows updated to use .NET 10 and run a multi-version test matrix; example projects and some csproj targets bumped to net10.0; several projects now multi-target netstandard2.0/net6/net8/net10 (with conditional net48 on Windows); EF Core integration tests and related model classes removed; README updated to require C# 12+ (PolySharp fallback).

Changes

Cohort / File(s) Summary
GitHub Actions: release workflows
/.github/workflows/release-github.yaml, /.github/workflows/release.yaml
Update DOTNET_VERSION from 9.0.x10.0.x.
GitHub Actions: test workflow
/.github/workflows/test.yaml
Replace single DOTNET_VERSION with multi-line dotnet-versions (6.0.x, 8.0.x, 10.0.x) and add job-level matrix over os (ubuntu-latest, windows-latest), switching runs-on to matrix.os.
Documentation
README.md, README.ja.md
Replace strict .NET 8.0+ requirement with C# 12+ guidance; add fallback instructions for older frameworks using LangVersion and PolySharp; add dotnet add package Linqraft --prerelease install example.
Example projects
examples/Linqraft.Benchmark/Linqraft.Benchmark.csproj, examples/Linqraft.Sample/Linqraft.Sample.csproj
Bump TargetFramework net9.0net10.0; update package refs for EFCore/Hosting to 10.*.
Repository-wide build props
src/Directory.Build.props, tests/Directory.Build.props
Convert single TargetFrameworkTargetFrameworks / add netstandard2.0 targets; tests add net6.0;net8.0;net10.0 and conditional append net48 on Windows; tests add/update several PackageReferences (Microsoft.NET.Test.Sdk, xunit.runner.visualstudio, Newtonsoft.Json, PolySharp).
Source projects
src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj, src/Linqraft/Linqraft.csproj
Replace single TargetFramework with TargetFrameworks multi-target list (includes netstandard2.0 and net6.0;net8.0;net10.0); conditional net48 on Windows for Linqraft.
Packages lock
src/Linqraft/packages.lock.json
Expand dependency groups across multiple frameworks (.NETFramework v4.8, .NETStandard v2.0, net6.0/net8.0/net10.0); add System.Text.Encoding.CodePages and other transitive entries across frameworks.
Tests: project edits
tests/Linqraft.Tests/Linqraft.Tests.csproj
Remove Microsoft.EntityFrameworkCore.Sqlite PackageReference.
Tests: removal
tests/Linqraft.Tests/UseEFCoreSenarioTest.cs
Remove entire EF Core integration test file, its SampleDbContext, seeding logic, entities, and test methods.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant GH as GitHub Actions
  participant Setup as actions/setup-dotnet
  participant Runner as Job Runner

  Dev->>GH: Push commits (workflows, csproj, tests, README)
  note right of GH `#E6F0FF`: release workflows now use DOTNET_VERSION=10.0.x
  GH->>Setup: setup-dotnet (dotnet-version: "10.0.x")
  Setup-->>GH: dotnet 10 installed
  GH->>Runner: run release jobs

  note right of GH `#FFF4E6`: test workflow uses dotnet-versions: 6.0,8.0,10.0 and matrix.os
  GH->>GH: expand matrix (os × dotnet-version)
  loop per matrix entry
    GH->>Setup: setup-dotnet (dotnet-version: matrix dotnet-version)
    Setup-->>Runner: dotnet installed
    Runner->>Runner: build & test on matrix.os
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas requiring extra attention:
    • Deletion of tests/Linqraft.Tests/UseEFCoreSenarioTest.cs — confirm intentional removal and test coverage impact.
    • src/Linqraft/packages.lock.json — verify added transitive deps and multi-target groups for compatibility.
    • Changes to Directory.Build.props and project TargetFrameworks — ensure consistent multi-target build behavior and conditional net48 inclusion.
    • tests/Directory.Build.props package version changes and PolySharp addition — confirm test runners and compatibility across targeted frameworks.

Poem

I hopped through pipelines, bumped nine to ten,
C# twelve now jingles in field and glen,
PolySharp bridges older vines,
I nibbled tests and pruned the lines,
A rabbit's cheer for tidy changes then. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: support .NET standard 2.0' directly aligns with the main objective of the PR, which is to update the Linqraft library to target .NETStandard2.0 instead of .NET 8.0, improving compatibility with older runtimes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
examples/Linqraft.Benchmark/Linqraft.Benchmark.csproj (1)

9-10: Consider pinning versions for consistent benchmark results.

Using wildcard versions (* and 10.*) in a benchmark project can lead to inconsistent results when different versions are restored. Benchmark results should be reproducible.

Consider pinning to specific versions:

-    <PackageReference Include="BenchmarkDotNet" Version="*" />
-    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.*" />
+    <PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
+    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.0" />
examples/Linqraft.Sample/Linqraft.Sample.csproj (1)

10-11: Consider the implications of wildcard versions in sample projects.

Using wildcard versions (10.*) means users cloning this repository at different times may get different dependency versions, potentially leading to inconsistent behavior or build failures if breaking changes are introduced in minor versions.

For sample/example projects that users reference, consider using more specific version constraints or exact versions.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 610adfb and 0c92f4e.

📒 Files selected for processing (14)
  • .github/workflows/release-github.yaml (1 hunks)
  • .github/workflows/release.yaml (1 hunks)
  • .github/workflows/test.yaml (1 hunks)
  • README.ja.md (1 hunks)
  • README.md (1 hunks)
  • examples/Linqraft.Benchmark/Linqraft.Benchmark.csproj (1 hunks)
  • examples/Linqraft.Sample/Linqraft.Sample.csproj (1 hunks)
  • src/Directory.Build.props (1 hunks)
  • src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj (0 hunks)
  • src/Linqraft/Linqraft.csproj (0 hunks)
  • src/Linqraft/packages.lock.json (2 hunks)
  • tests/Directory.Build.props (2 hunks)
  • tests/Linqraft.Tests/Linqraft.Tests.csproj (0 hunks)
  • tests/Linqraft.Tests/UseEFCoreSenarioTest.cs (0 hunks)
💤 Files with no reviewable changes (4)
  • tests/Linqraft.Tests/Linqraft.Tests.csproj
  • src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj
  • src/Linqraft/Linqraft.csproj
  • tests/Linqraft.Tests/UseEFCoreSenarioTest.cs
🔇 Additional comments (12)
src/Linqraft/packages.lock.json (1)

1-125: Proceeding with verification of remaining compatibility concerns:

Lock file correctly reflects .NETStandard 2.0 targeting with appropriate polyfill dependencies and no compatibility or security concerns.

The transition from net8.0 to .NETStandard,Version=v2.0 is properly reflected. System.Runtime.CompilerServices.Unsafe 6.0.0 can be used when targeting .NET 6 or earlier, confirming forward compatibility with the transitive 4.5.3 requirement from System.Memory. The added System.* polyfill packages (Memory, Buffers, Reflection.Metadata, Text.Encoding.CodePages, etc.) at pinned versions are standard backports known to be compatible with .NETStandard 2.0 and enable C# 12 language features on older frameworks via PolySharp.

Security verification confirmed no public CVEs or Microsoft advisories for System.Reflection.Metadata 8.0.0 or System.Text.Encoding.CodePages 7.0.0. Nerdbank.GitVersioning 3.9.50 contains no supported framework assets and has no dependencies, confirming compatibility as a build-time tool across all target frameworks.

.github/workflows/release-github.yaml (1)

17-17: Verify .NET 10.0.x availability and stability for GitHub releases.

Same concern as in .github/workflows/release.yaml - ensure .NET 10.0.x is stable before using it in release workflows.

src/Directory.Build.props (1)

3-3: LGTM! Good choice for broad compatibility.

Targeting netstandard2.0 provides excellent compatibility with older .NET versions (.NET Framework 4.6.1+, .NET Core 2.0+, and all modern .NET versions) while still allowing modern C# features through the LangVersion setting and PolySharp.

examples/Linqraft.Benchmark/Linqraft.Benchmark.csproj (1)

4-4: Verify .NET 10.0 compatibility.

Ensure .NET 10.0 is released and stable before targeting it in example projects.

.github/workflows/test.yaml (1)

12-15: Good approach for multi-framework testing.

Setting up multiple .NET versions (6.0.x, 8.0.x, 10.0.x) aligns well with the multi-targeting strategy in the test projects. This ensures compatibility across LTS and latest versions.

However, verify that .NET 10.0.x is available and stable.

README.ja.md (2)

211-211: LGTM! Helpful installation guidance.

Adding the concrete installation command with the --prerelease flag provides clear guidance for users.


193-205: Documentation is accurate; no changes needed.

The correct MSBuild LangVersion syntax uses the minor version (e.g., "12.0", "11.0", "10.0"), which matches the documentation. The C# 12 requirement explanation, PolySharp workaround, and configuration example are all correct.

tests/Directory.Build.props (2)

3-6: LGTM! Comprehensive multi-targeting strategy.

Testing across net6.0, net8.0, net10.0, and net48 (Windows) provides excellent coverage of supported frameworks. This aligns well with the multi-version setup in the test workflow.


21-24: LGTM! PolySharp enables C# 12 features on older frameworks.

Adding PolySharp correctly enables modern C# features on older target frameworks, which is essential for the C# 12 interceptors used by this library.

examples/Linqraft.Sample/Linqraft.Sample.csproj (1)

3-3: Verify .NET 10.0 compatibility.

Ensure .NET 10.0 is released and stable before targeting it in sample projects that users may reference.

.github/workflows/release.yaml (1)

7-7: No issues found—.NET 10.0.x is production-ready.

.NET 10.0 is released (GA) and is an LTS release, making it suitable for production releases. The workflow change is appropriate.

README.md (1)

191-203: Documentation updates align well with .NET Standard 2.0 shift.

The prerequisites section has been appropriately updated to reflect the new C# 12 language requirement (instead of .NET 8.0+ runtime requirement) and includes clear guidance for enabling C# 12 features on .NET 7 and below using PolySharp. The XML configuration example is correct and provides users with the exact setup needed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 464b5fb and 384d2f0.

📒 Files selected for processing (3)
  • README.md (1 hunks)
  • src/Linqraft/Linqraft.csproj (1 hunks)
  • tests/Directory.Build.props (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md
🔇 Additional comments (3)
tests/Directory.Build.props (3)

3-6: LGTM! Multi-targeting configuration is correct.

The multi-targeting setup appropriately tests across modern .NET versions (net6.0, net8.0, net10.0) and conditionally includes net48 on Windows, which is correct since .NET Framework is Windows-only.


22-25: PolySharp configuration looks appropriate.

The PolySharp package is correctly configured with PrivateAssets="all" to prevent transitive exposure and the asset inclusion settings are comprehensive for enabling C# 12 features on older target frameworks.


14-14: Reconsider: Downgrading to version 16.* does not break .NET 10 compatibility.

Microsoft.NET.Test.Sdk 17.14.1 targets .NET Standard 2.0, which is compatible with .NET 10.0. Since .NET 10 implements .NET Standard 2.0 and earlier, packages targeting .NET Standard 2.0 will work on .NET 10.0 projects. Version 16.* will function correctly with net10.0 targets.

However, while this downgrade won't break compatibility, consider that using significantly older versions may miss recent bug fixes and improvements. Evaluate whether you need the specific benefits of version 16.*, or if a more recent stable version would be preferable.

Likely an incorrect or invalid review comment.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/Directory.Build.props (1)

3-3: Consider using singular TargetFramework for consistency.

While TargetFrameworks (plural) works with a single value, the standard convention is to use TargetFramework (singular) when targeting only one framework and TargetFrameworks (plural) for multiple targets.

Apply this diff for consistency with .NET conventions:

-    <TargetFrameworks>netstandard2.0</TargetFrameworks>
+    <TargetFramework>netstandard2.0</TargetFramework>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 384d2f0 and 3814b0a.

📒 Files selected for processing (4)
  • src/Directory.Build.props (1 hunks)
  • src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj (1 hunks)
  • src/Linqraft/Linqraft.csproj (1 hunks)
  • src/Linqraft/packages.lock.json (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj
🧰 Additional context used
🪛 GitHub Actions: .NET Build and Test
src/Linqraft/Linqraft.csproj

[error] 1-1: NU1004: The project target frameworks are different than the lock file's target frameworks. Lock file target frameworks: netstandard2.0,net6.0,net8.0,net10.0. Project target frameworks net48,netstandard2.0,net10.0,net6.0,net8.0. The packages lock file is inconsistent with the project dependencies so restore can't be run in locked mode. Disable the RestoreLockedMode MSBuild property or pass an explicit --force-evaluate option to run restore to update the lock file.


[error] 1-1: Process completed with exit code 1.

🔇 Additional comments (2)
src/Linqraft/Linqraft.csproj (1)

3-6: Multi-targeting implementation looks correct.

The multi-targeting configuration properly targets .NET Standard 2.0, .NET 6.0, 8.0, and 10.0, with conditional .NET Framework 4.8 support on Windows. This aligns well with the PR objectives to broaden compatibility.

src/Linqraft/packages.lock.json (1)

1-350: Lock file will be regenerated to fix the pipeline failure.

This auto-generated lock file is currently out of sync with the project file (as indicated by the NU1004 pipeline error). Once you run dotnet restore --force-evaluate on src/Linqraft/Linqraft.csproj, this file will be automatically regenerated with the correct framework entries and ordering.

No manual changes to this file are necessary—just commit the regenerated version after running the restore command.

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