Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-dotnet@v6.0.0
with:
dotnet-version: |
8.0.x
10.0.401
global-json-file: global.json
dotnet-version: 10.0.401
- name: Restore validation tools
run: dotnet tool restore
- name: Validate version scenarios
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
ref: ${{ needs.validate.outputs.sha }}
- uses: actions/setup-dotnet@v6.0.0
with:
dotnet-version: 10.0.401
global-json-file: global.json
- uses: actions/download-artifact@v8.0.2
with:
name: ${{ needs.validate.outputs.artifact-name }}
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

## 1.0.0 (unreleased)

### Breaking changes

- Removed the .NET 8 target and EF Core 8 dependency. Applications must target
.NET 10 or .NET 11 to use this release. Applications remaining on .NET 8
must use the earlier 0.x package line.

### Added

- .NET 11 support with EF Core 11 RC2 (`11.0.0-rc.2.26504.105`), including
SQLite sample and test coverage, NuGet assets, and debugging symbols.
- Builds use the .NET 11 RC2 SDK. .NET 10 with EF Core 10 remains supported.

### Release versioning

- GitVersion's `next-version: 1.0.0` makes this a major release from the
previous 0.x line. Remove the hint after tagging `v1.0.0`.
- Use `+semver: major` in the commit or merge message to record the breaking
change explicitly.
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<LangVersion>14.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -12,10 +12,10 @@
<DebugSymbols>true</DebugSymbols>
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<EntityFrameworkVersion Condition="'$(TargetFramework)' == 'net8.0'">8.0.32</EntityFrameworkVersion>
<EntityFrameworkVersion Condition="'$(TargetFramework)' == 'net10.0'">10.0.12</EntityFrameworkVersion>
<DependencyInjectionVersion Condition="'$(TargetFramework)' == 'net8.0'">8.0.1</DependencyInjectionVersion>
<EntityFrameworkVersion Condition="'$(TargetFramework)' == 'net11.0'">11.0.0-rc.2.26504.105</EntityFrameworkVersion>
<DependencyInjectionVersion Condition="'$(TargetFramework)' == 'net10.0'">10.0.12</DependencyInjectionVersion>
<DependencyInjectionVersion Condition="'$(TargetFramework)' == 'net11.0'">11.0.0-rc.2.26504.105</DependencyInjectionVersion>
</PropertyGroup>
<Import Project="$(VersionPropsFile)" Condition="'$(VersionPropsFile)' != '' and Exists('$(VersionPropsFile)')" />
</Project>
2 changes: 2 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
mode: ContinuousDeployment
# Dropping .NET 8 is a breaking change. Remove this hint after v1.0.0 is tagged.
next-version: 1.0.0
tag-prefix: '[vV]?'
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
Expand Down
36 changes: 28 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,23 @@ for configuration, multiple-context examples, and cancellation compatibility.
dotnet add package myNOC.EntityFramework.Query
```

The package, tests, and sample target **.NET 8.0 and .NET 10.0** (LTS).
The .NET 8 asset uses the latest EF Core 8 servicing release; the .NET 10
asset uses EF Core 10. EF Core 10 cannot run on .NET 8. Dependency reports
may therefore show newer major versions for .NET 8; this is intentional.
**Breaking change in 1.0.0: .NET 8 and EF Core 8 support has been removed.**
Upgrade applications to .NET 10 or .NET 11 before updating this package.
Applications remaining on .NET 8 must use the earlier 0.x package line.
See the [release notes](./CHANGELOG.md).

The package, tests, and sample target **.NET 10.0 and .NET 11.0**.
The .NET 10 LTS asset uses EF Core 10.
The .NET 11 asset uses EF Core **11.0.0-rc.2.26504.105**; .NET 11 support
currently targets [RC2](https://devblogs.microsoft.com/dotnet/dotnet-11-rc-2/).
Use matching versions of your application's EF Core provider and other EF packages.
Dependency reports may show newer major versions for older targets; this is intentional.
Test tooling uses the current stable MSTest, VSTest, Coverlet and NSubstitute.

## Local build and validation

Install the .NET SDK selected by [global.json](./global.json), plus the
.NET 8 runtime to run the .NET 8 tests. No .NET 9 SDK/runtime is needed.
Install the .NET 11 RC2 SDK selected by [global.json](./global.json), plus the
.NET 10 runtime to run the .NET 10 tests. No .NET 8 SDK/runtime is needed.
Run these commands from the repository root:

```shell
Expand All @@ -64,6 +71,9 @@ dotnet list package --vulnerable --include-transitive
```

Warnings are errors in every project. Tests run for both target frameworks.
The library suppresses only NuGet's `NU5104` packaging warning because its
.NET 11 asset intentionally depends on EF Core 11 RC2. Remove that exception
when updating to EF Core 11 GA.
PowerShell 7 is required for the versioning and package-validation scripts.
To reproduce CI's version stamping locally:

Expand Down Expand Up @@ -91,6 +101,15 @@ props file used by restore, build and pack. It stamps `Version`, `PackageVersion
`AssemblyVersion`, `FileVersion` and `InformationalVersion`. The informational
version and NuGet repository metadata contain the exact build commit.

For this breaking release, `next-version: 1.0.0` in GitVersion's configuration
ensures the next release advances from 0.x to **1.0.0**, including after a squash
merge. Remove the hint after `v1.0.0` is tagged; subsequent releases increment
from that tag. The recommended commit/merge message is:

```text
Drop .NET 8 support and add .NET 11 / EF Core 11 support +semver: major
```

- `main` produces only stable `major.minor.patch` packages; two guards reject
prereleases and publishing from any other branch.
- A commit after `v1.2.3` produces `1.2.4`. Publishing creates `v1.2.4` on
Expand All @@ -103,7 +122,8 @@ version and NuGet repository metadata contain the exact build commit.
- Avoid `+semver: none` for publishable changes: NuGet versions are immutable.

[Test-Versioning.ps1](./scripts/Test-Versioning.ps1) exercises patch releases,
stable tags, tagged reruns, previews, explicit minor/major increments and
the 0.x-to-1.0.0 transition through a squash merge, retiring the version hint,
stable tags, tagged reruns, previews, explicit minor/major increments, and
merge-message increments in an isolated temporary Git repository.

## CI and Trusted Publishing
Expand Down Expand Up @@ -188,8 +208,8 @@ SQLite in-memory database, then runs list and scalar queries. No external databa
server is required. Run it from the repository root for either supported target:

```shell
dotnet run --project sample/QuerySample --framework net8.0
dotnet run --project sample/QuerySample --framework net10.0
dotnet run --project sample/QuerySample --framework net11.0
```

The [tests](./tests/myNOC.Tests.EntityFramework.Query/) cover SQL translation and
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "10.0.401",
"version": "11.0.100-rc.2.26504.105",
"rollForward": "latestPatch",
"allowPrerelease": false
"allowPrerelease": true
}
}
11 changes: 10 additions & 1 deletion scripts/Test-Packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ try {
if (Get-ChildItem "$scratch/package" -Recurse -Filter '*.pdb') {
throw 'Portable PDBs must be in the symbol package, not the primary package.'
}
$frameworks = @('net8.0', 'net10.0')
$frameworks = @('net10.0', 'net11.0')
$assemblies = @(Get-ChildItem "$scratch/package/lib" -Recurse -Filter '*.dll')
if ($assemblies.Count -ne $frameworks.Count) { throw 'Expected one packaged DLL per supported target framework.' }
if (@($metadata.dependencies.group).Count -ne $frameworks.Count) { throw 'Expected one dependency group per supported target framework.' }
$pdbs = @(Get-ChildItem "$scratch/symbols" -Recurse -Filter '*.pdb')
if ($pdbs.Count -ne $frameworks.Count) { throw 'Expected one packaged PDB per target framework.' }
foreach ($framework in $frameworks) {
$dependencyGroup = @($metadata.dependencies.group | Where-Object { $_.targetFramework -eq $framework })
$efDependency = @($dependencyGroup.dependency | Where-Object { $_.id -eq 'Microsoft.EntityFrameworkCore' })
$efMajor = ($framework -replace '^net', '').Split('.')[0]
if ($dependencyGroup.Count -ne 1 -or $efDependency.Count -ne 1 -or $efDependency[0].version -notmatch "^$efMajor\.") {
throw "Expected an EF Core $efMajor dependency for $framework."
}
$assembly = "$scratch/package/lib/$framework/$packageId.dll"
$pdb = "$scratch/symbols/lib/$framework/$packageId.pdb"
if (!(Test-Path $assembly) -or !(Test-Path $pdb)) { throw "Missing DLL/PDB for $framework." }
Expand Down
21 changes: 21 additions & 0 deletions scripts/Test-Versioning.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,29 @@ try {
[System.IO.Directory]::CreateDirectory($scratch) | Out-Null
Invoke-Git init --initial-branch=main
Copy-Item "$root/GitVersion.yml" "$scratch/GitVersion.yml"
# Keep this regression scenario after the real 1.0.0 hint is retired.
$configuration = Get-Content "$scratch/GitVersion.yml" -Raw
$configuration = $configuration -replace '(?m)^next-version:.*\r?\n', ''
Set-Content "$scratch/GitVersion.yml" ("next-version: 1.0.0`n" + $configuration) -NoNewline
Invoke-Git add GitVersion.yml
Add-Commit 'Initial release'
Invoke-Git tag v0.1.6
Assert-Version '0.1.6'
Invoke-Git checkout -b work/net11
Set-Content "$scratch/frameworks.txt" 'net10.0;net11.0'
Invoke-Git add frameworks.txt
Add-Commit 'Drop .NET 8 and add .NET 11'
Assert-Version '1.0.0-alpha.net11.1'
Invoke-Git checkout main
Invoke-Git merge --squash work/net11
Add-Commit 'Drop .NET 8 and add .NET 11 (squashed without a version directive)'
Assert-Version '1.0.0'
Invoke-Git tag v1.0.0
Assert-Version '1.0.0'
Set-Content "$scratch/GitVersion.yml" $configuration -NoNewline
Invoke-Git add GitVersion.yml
Add-Commit 'Remove the completed next-version hint'
Assert-Version '1.0.1'
Invoke-Git tag v1.2.3
Assert-Version '1.2.3'
Add-Commit 'Patch change'
Expand Down
13 changes: 10 additions & 3 deletions src/myNOC.EntityFramework.Query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ Register the EF Core provider used by your application separately. To follow the
SQLite examples, also install `Microsoft.EntityFrameworkCore.Sqlite`, using an
EF Core version matching your target framework and other EF packages.

Supports **.NET 8.0 and .NET 10.0** (LTS), using EF Core 8 and EF Core 10
respectively. Match your application's Entity Framework packages to its target.
**Breaking change in 1.0.0: .NET 8 and EF Core 8 support has been removed.**
Upgrade to .NET 10 or .NET 11 before updating this package. Applications that
remain on .NET 8 must use the earlier 0.x package line.

Supports **.NET 10.0 and .NET 11.0**, using EF Core 10 and 11 respectively.
.NET 10 is an LTS target. .NET 11 support currently uses
[RC2](https://devblogs.microsoft.com/dotnet/dotnet-11-rc-2/) and EF Core
**11.0.0-rc.2.26504.105**. Match your application's Entity Framework packages
and database provider to its target and EF Core version.
See the [repository build instructions](https://github.com/erenken/queryPattern#local-build-and-validation)
to build the library/sample and run tests against both frameworks.

Expand All @@ -29,7 +36,7 @@ Trusted Publishing policy, not a permanent API key. See the

## Source Link debugging

The `.snupkg` includes portable PDBs for .NET 8 and .NET 10. Source Link maps
The `.snupkg` includes portable PDBs for .NET 10 and .NET 11. Source Link maps
to the exact build commit and CI verifies matching source downloads/checksums.
In Visual Studio, add `https://symbols.nuget.org/download/symbols` under
**Tools > Options > Debugging > Symbols**, enable **Source Link support** and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/erenken/queryPattern</PackageProjectUrl>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageReleaseNotes>Breaking change in 1.0.0: .NET 8 and EF Core 8 support has been removed. Target .NET 10 with EF Core 10 or .NET 11 with EF Core 11 RC2 (11.0.0-rc.2.26504.105).</PackageReleaseNotes>
<!-- EF Core 11 RC2 is an intentional go-live prerelease dependency. Remove this exception when upgrading to EF Core 11 GA. -->
<NoWarn>$(NoWarn);NU5104</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading