From 737ec797310fad1276b6b92d23011a0a72596a4a Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Sat, 8 Aug 2026 11:59:18 +0000 Subject: [PATCH] Replace net7.0 with net8.0 and net10.0 .NET 7 left support in May 2024. The target list named it and no supported modern framework, so a consumer on net8.0 or net10.0 resolved the netstandard2.0 asset and silently lost the generic-math surface with it. was net7.0;netstandard2.0 is netstandard2.0;net8.0;net10.0 netstandard2.0 stays, so .NET Framework and the older runtimes are unaffected. Both replacements are LTS. The generic-math folder needs INumber and so must still be excluded below net7.0. Its condition was a literal `!= 'net7.0'`, which would have dropped it from every new framework silently; it is now a compatibility test, so adding a target keeps it. Verified on the built assemblies rather than assumed: IClosedArithmetics is present in net8.0 and net10.0 and absent from netstandard2.0, with Sumf present in all three as the control. Dropping a framework breaks anything that pins one. UnitTests pinned net7.0 on its project reference and is repointed to net10.0; so did all nine measurement harnesses outside this repository, which is what the BREAKING-CHANGES entry warns about, since the failure is an unhelpful NETSDK1005 about a missing assets target. This also removes NETSDK1204 -- "ahead-of-time compilation is not supported on the current platform 'osx-arm64'" -- which was what stopped AngouriMath.CPP.Exporting from being built against the source next to it rather than against a 1.4.0-preview.2 package. That is not fixed here, since two further changes are needed for it, but it is no longer blocked. See #808. 5551 unit tests and 130 F# tests pass; all four packable projects build; casbench 113/117 with 0 wrong, propcheck 0 failures, rootcheck 596/596, simpsweep 10463/10463. Co-Authored-By: Claude Opus 5 --- BREAKING-CHANGES.md | 38 ++++++++++++++++++++++++ Sources/AngouriMath/AngouriMath.csproj | 9 ++++-- Sources/Tests/UnitTests/UnitTests.csproj | 2 +- 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/BREAKING-CHANGES.md b/BREAKING-CHANGES.md index 5e0592596..8fbe0e24c 100644 --- a/BREAKING-CHANGES.md +++ b/BREAKING-CHANGES.md @@ -47,6 +47,44 @@ read first. | **silent** | two integrals | answered correctly | unevaluated — a deliberate loss | | **silent** | `k/(a x^2 + c)` and `k/sqrt(a x^2 + c)` for symbolic `a` | `NaN` | a piecewise on the sign of the discriminant | | loud | `Compile` over a missing variable | `KeyNotFoundException` | `UncompilableNodeException` | +| loud | the target frameworks | `net7.0;netstandard2.0` | `netstandard2.0;net8.0;net10.0` | + +--- + +## Target frameworks + +`net7.0` is replaced by `net8.0` and `net10.0`. `netstandard2.0` is unchanged, so consumers on +.NET Framework and the older runtimes are unaffected. + +| | was | is | +|---|---|---| +| `TargetFrameworks` | `net7.0;netstandard2.0` | `netstandard2.0;net8.0;net10.0` | + +.NET 7 left support in May 2024, so the old list named one framework nobody should still be +targeting and no supported modern one. A consumer on net8.0 or net10.0 previously resolved the +`netstandard2.0` asset and silently lost the generic-math surface with it; they now get a real +target. + +**What breaks.** Anything that pins the framework of its reference: + +```xml + + TargetFramework=net7.0 + +``` + +fails with `NETSDK1005: Assets file ... doesn't have a target for 'net7.0'`. Change it to `net10.0` +or `net8.0`. This is not hypothetical -- every one of the nine measurement harnesses in this +workspace pinned `net7.0` and had to be repointed. + +A consumer that references the NuGet package rather than the project picks its asset by its own +framework and needs no change, unless it targets `net7.0` itself, in which case it now resolves +`netstandard2.0` and loses the generic-math types. + +**Generic math is unchanged in reach.** `Core/Entity/GenericMath` needs `INumber` and so is +still compiled only into the net7.0-and-later targets -- now written as a compatibility test +rather than a literal `!= 'net7.0'`, so adding a framework does not silently drop it. Verified on +the built assemblies: present in `net8.0` and `net10.0`, absent from `netstandard2.0`. --- diff --git a/Sources/AngouriMath/AngouriMath.csproj b/Sources/AngouriMath/AngouriMath.csproj index 7b2d7e46e..5085a84b6 100644 --- a/Sources/AngouriMath/AngouriMath.csproj +++ b/Sources/AngouriMath/AngouriMath.csproj @@ -1,7 +1,7 @@  - net7.0;netstandard2.0 + netstandard2.0;net8.0;net10.0 AngouriMath AngouriMath @@ -88,6 +88,11 @@ - + + diff --git a/Sources/Tests/UnitTests/UnitTests.csproj b/Sources/Tests/UnitTests/UnitTests.csproj index 006a0c7db..3d3bb67e5 100644 --- a/Sources/Tests/UnitTests/UnitTests.csproj +++ b/Sources/Tests/UnitTests/UnitTests.csproj @@ -34,7 +34,7 @@ - TargetFramework=net7.0 + TargetFramework=net10.0