Skip to content

Bump NSubstitute to 6.0.0, fix nullable-API test breaks#292

Merged
vgmello merged 1 commit into
mainfrom
chore/bump-nsubstitute-refitter
Jul 17, 2026
Merged

Bump NSubstitute to 6.0.0, fix nullable-API test breaks#292
vgmello merged 1 commit into
mainfrom
chore/bump-nsubstitute-refitter

Conversation

@vgmello

@vgmello vgmello commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bumps NSubstitute 5.3.06.0.0 (major). Fixes the (T)x[0] CallInfo indexer cast pattern in 3 test files that no longer compiles under 6.0's nullable-annotated public API, switching to the null-safe x.ArgAt<T>(0) extension.
  • Evaluated Refitter.MSBuild 2.0.02.1.0 but reverted: 2.1.0 refactored the MSBuild task itself and throws MissingMethodException: System.Text.ValueStringBuilder.AsSpan() during code generation. Left at 2.0.0 pending an upstream fix.

Supersedes/consolidates:

Test plan

  • dotnet build AppDomain.slnx — succeeds
  • dotnet test tests/AppDomain.Tests (unit, excl. Integration) — 160 passed
  • dotnet test libs/Momentum/tests/Momentum.Extensions.Tests — 341 passed

🤖 Generated with Claude Code

NSubstitute 6.0 enables nullable annotations on its public API, which
breaks the `(T)x[0]` CallInfo indexer cast pattern used in three test
files. Switched to the null-safe `x.ArgAt<T>(0)` extension.

Refitter.MSBuild 2.1.0 was evaluated but reverted to 2.0.0: the release
refactored the MSBuild task itself and throws
`MissingMethodException: System.Text.ValueStringBuilder.AsSpan()` during
code generation in this environment.

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

Copy link
Copy Markdown

@vgmello
vgmello merged commit e1e76a1 into main Jul 17, 2026
8 checks passed
@vgmello
vgmello deleted the chore/bump-nsubstitute-refitter branch July 17, 2026 02:50
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.

1 participant