Skip to content

Retarget net40/net451 to net462 - #235

Merged
tombogle merged 4 commits into
masterfrom
retarget-frameworks
Sep 22, 2026
Merged

tombogle merged 4 commits into
masterfrom
retarget-frameworks

Conversation

@tombogle

Copy link
Copy Markdown
Contributor

Summary

  • Drops the net40 target framework: a GitHub code search across the sillsdev org found no remaining consumers, and nothing in icu-dotnet's own test suite exercised it either.
  • Replaces the net451 target framework with net462, matching the framework already used by current consumers (libpalaso, LibChorus) and remaining the nearest compatible target for others (FieldWorks, SayMore, HearThis). This is a breaking change for anything still targeting net461 or lower.
  • Unifies Microsoft.Extensions.DependencyModel on 10.0.9 across all target frameworks (it now officially supports net462), removing the old net451-era pin to 2.1.0 and its accompanying Newtonsoft.Json override.
  • Upgrades System.ValueTuple 4.5.0 → 4.6.2 to match (4.6.2 requires net462 as its floor).
  • Removes the explicit Microsoft.SourceLink.GitHub PackageReference — verified the .NET 8+ SDK now embeds correct raw.githubusercontent.com source link mappings without it.
  • Removes deprecated System.IO.FileSystem/System.IO.FileSystem.Primitives 4.3.0 references from the test project (netstandard1.x-era facades, no longer needed).

This is the first of two stacked PRs; the second (build-path cleanup, deleting build/icu-dotnet.proj) is stacked on top of this one.

Test plan

  • dotnet build/dotnet test/dotnet pack all succeed on net462/net8.0/net10.0
  • Confirmed no System.ValueTuple compatibility warning on net462
  • Confirmed source link mapping still correct in packed .snupkg PDBs for all four frameworks

🤖 Generated with Claude Code

net40 has no known consumers anywhere in the sillsdev org, and net451 was
already resolving to the nearest-lower fallback for every actively
maintained .NET Framework consumer (FieldWorks, libpalaso, SayMore,
LibChorus, HearThis), none of which target below net462. Replacing net451
with net462 matches those consumers directly.

This also lets Microsoft.Extensions.DependencyModel unify on 10.0.9 across
all target frameworks (it now officially supports net462), removing the
net451-era pin to 2.1.0 and its accompanying Newtonsoft.Json override.
System.ValueTuple is upgraded to 4.6.2 to match, since 4.6.2 requires
net462 as its floor.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown

Test Results

       9 files  +    1     727 suites  +79   11s ⏱️ +2s
   439 tests ±    0     435 ✔️ ±    0      4 💤 ±0  0 ±0 
4 033 runs  +433  3 817 ✔️ +427  216 💤 +6  0 ±0 

Results for commit 6402b10. ± Comparison against base commit e596389.

♻️ This comment has been updated with latest results.

@imnasnainaec

This comment was marked as resolved.

tombogle and others added 2 commits September 21, 2026 14:21
Now that net40 is dropped entirely as a target framework, the NET40
symbol is never defined, making every #if NET40 / #if !NET40 branch
permanently dead code. Collapse each to its always-taken branch and
drop the now-moot explanatory comments (.NET 4.5/4.5.1 API
availability notes). Also update leftover net461-specific comments
left over from the net462 retarget.

Addresses reviewer feedback on PR #235.

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

This comment was marked as resolved.

Two RunNUnitTC/RunNUnit targets still pointed at the net461 output
directory after the net462 retarget. This file is deleted entirely in
the next stacked PR, but keep it internally consistent in the meantime.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tombogle
tombogle merged commit d9005ac into master Sep 22, 2026
7 checks passed
@tombogle
tombogle deleted the retarget-frameworks branch September 22, 2026 11:34
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