Repository navigation
Support NUnit 5 on .NET 8 - #310
Conversation
Co-authored-by: sergey-tihon <1197905+sergey-tihon@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The framework, packaging, CI, documentation, and NUnit delegate changes are consistent and covered by the existing test suites.
0 open findings
What changed in this PR
Updates FsUnit for NUnit 5 and .NET 8 while retaining .NET 6 for the FAKE runner.
Changes:
- Migrates projects, CI, documentation, and package assets to .NET 8.
- Upgrades NUnit to 5.0 and replaces removed delegates with
System.Action. - Regenerates Paket dependency constraints.
| File | Description |
|---|---|
.github/workflows/main.yml |
Installs .NET 8 and FAKE’s .NET 6 SDK. |
global.json |
Pins the .NET 8 SDK. |
paket.dependencies |
Targets .NET 8 and requests NUnit 5. |
paket.lock |
Locks updated frameworks and dependencies. |
docs/NUnit.fsx |
References .NET 8 assemblies. |
docs/index.fsx |
References .NET 8 assemblies. |
docs/FsUnitTyped.fsx |
References .NET 8 assemblies. |
src/FsUnit.NUnit/FsUnit.fs |
Adapts assertions to NUnit 5 delegates. |
src/FsUnit.NUnit/FsUnitTyped.fs |
Uses System.Action for typed assertions. |
src/FsUnit.NUnit/FsUnit.NUnit.fsproj |
Targets .NET 8. |
src/FsUnit.NUnit/paket.template |
Packages .NET 8 assets. |
src/FsUnit.Xunit/FsUnit.Xunit.fsproj |
Replaces its .NET 6 target. |
src/FsUnit.Xunit/paket.template |
Packages .NET 8 assets. |
src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj |
Replaces its .NET 6 target. |
src/FsUnit.MsTestUnit/paket.template |
Packages .NET 8 assets. |
tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj |
Runs NUnit tests on .NET 8. |
tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj |
Runs xUnit tests on .NET 8. |
tests/FsUnit.MsTest.Test/FsUnit.MsTest.Test.fsproj |
Runs MSTest tests on .NET 8. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Besides that the dedicated project to substitute the FAKE script would be nice to drop .NET6 at some time. |
|
How do you see it? Migration to Fun.Build or another solution? |
|
Either that or run FAKE from a fsproj as the statement says: |
|
@CaptnCodr Like I said on the #309 I am willing to help to make these changes happen. I have a POC of that Fake build project on my local machine already and I can open a PR for that if you want. Or I can create another issue with detailed instructions if the Copilot way is the way you want to move forward. |
|
@sergey-tihon Then we can merge this and @Wotee can open a PR for the Fake build project. |
|
@Wotee, sorry, my bad. I've got an email about the new issue and assigned it to Copilot without checking PRs. |
FsUnit’s NUnit dependency and .NET 6 targets prevented consumers from upgrading to NUnit 5. This updates the repository to .NET 8 and adapts FsUnit to NUnit 5’s delegate APIs.
System.Action.