You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/articles/nunit/release-notes/framework.md
+156Lines changed: 156 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,165 @@ uid: frameworkreleasenotes
3
3
---
4
4
<!-- markdownlint-disable-file MD013 -->
5
5
<!-- markdownlint-disable-file MD033 -->
6
+
<!-- markdownlint-disable-file MD060 -->
6
7
7
8
# Framework Release
8
9
10
+
## NUnit 4.6.0 - May 4, 2026
11
+
12
+
This is a release with several enhancements, more type safety and several bugs fixed.
13
+
14
+
If you're using [TestDelegate](https://docs.nunit.org/api/NUnit.Framework.TestDelegate.html) or [ActualValueDelegate](https://docs.nunit.org/api/NUnit.Framework.Constraints.ActualValueDelegate-1.html) and you're on .net 8 or lower, then be aware of the requirement for how to avoid ambiguity errors, see the [Breaking changes section on Issue4824](#the-following-issues-are-marked-as-breaking-changes).
15
+
16
+
Please also update the NUnit.Analyzers package to version 4.13.
17
+
18
+
There are 27 issues fixed in this release.
19
+
20
+
### Enhancements
21
+
22
+
*[5232](https://github.com/nunit/nunit/issues/5232) Run the collection equivalency tests on MacOS. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5234](https://github.com/nunit/nunit/pull/5234)
23
+
*[5173](https://github.com/nunit/nunit/issues/5173) Access to the actual Exception object. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5217](https://github.com/nunit/nunit/pull/5217)
24
+
*[5158](https://github.com/nunit/nunit/issues/5158) Constants for canonical platform names. Thanks to [Jonathan Gilbert](https://github.com/logiclrd) for [PR 5159](https://github.com/nunit/nunit/pull/5159)
25
+
*[5132](https://github.com/nunit/nunit/issues/5132) Thread.Abort() in Test causes "Test cancelled by user" result for NUnit 4.5.0. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5171](https://github.com/nunit/nunit/pull/5171)
26
+
*[4824](https://github.com/nunit/nunit/issues/4824) Convert `TestDelegate` and `ActualValueDelegate` to `Action` and `Func<T>`. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5196](https://github.com/nunit/nunit/pull/5196)
27
+
*[4254](https://github.com/nunit/nunit/issues/4254) Improve performance of equivalency, superset, and subset constraints for homogenous collections. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5224](https://github.com/nunit/nunit/pull/5224)
28
+
*[4240](https://github.com/nunit/nunit/issues/4240) Feature request: Run the tests in main thread. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5188](https://github.com/nunit/nunit/pull/5188)
29
+
*[4156](https://github.com/nunit/nunit/issues/4156)[Timeout] doesn't work on abstract class fixtures. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5167](https://github.com/nunit/nunit/pull/5167)
30
+
*[4128](https://github.com/nunit/nunit/issues/4128) Improve how exception are displayed. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5216](https://github.com/nunit/nunit/pull/5216)
31
+
*[3822](https://github.com/nunit/nunit/issues/3822) Make ArgDisplayNames public. Thanks to [Paul Irwin](https://github.com/paulirwin) for [PR 5236](https://github.com/nunit/nunit/pull/5236)
32
+
*[3663](https://github.com/nunit/nunit/issues/3663) When TestCaseSource produces empty cases collection, test should be Passed/Failed/Inconclusive per creator expectation. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5125](https://github.com/nunit/nunit/pull/5125)
33
+
*[2933](https://github.com/nunit/nunit/issues/2933) Add Is.SameAs overload with a reference type constraint. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5134](https://github.com/nunit/nunit/pull/5134)
34
+
35
+
### Bug fixes
36
+
37
+
*[5238](https://github.com/nunit/nunit/issues/5238)`HookData.Exception` will report an NUnit-wrapped exception object in `AfterTestHook(HookData hookData)`. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5240](https://github.com/nunit/nunit/pull/5240)
38
+
*[5237](https://github.com/nunit/nunit/issues/5237)`Assert.Pass()` can cause `HookData.Exception` to be populated with an exception. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5240](https://github.com/nunit/nunit/pull/5240)
39
+
*[5194](https://github.com/nunit/nunit/issues/5194) Add generic SameAs<> to `ConstraintExpression`. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5200](https://github.com/nunit/nunit/pull/5200)
40
+
*[5179](https://github.com/nunit/nunit/issues/5179) Change in behaviour in v4.5 when passing a single "null" to a "params" test method via testcasesource. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5184](https://github.com/nunit/nunit/pull/5184)
41
+
*[5178](https://github.com/nunit/nunit/issues/5178) Passing IEnumerable<object> from TestCaseSource to a generic method seems to break in some cases. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5195](https://github.com/nunit/nunit/pull/5195)
42
+
*[5161](https://github.com/nunit/nunit/issues/5161) PlatformAttribute is declared `AllowMultiple = true` but that doesn't work. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5166](https://github.com/nunit/nunit/pull/5166)
43
+
*[5146](https://github.com/nunit/nunit/issues/5146) Stack overflow in PropertiesComparer when object has property of its own value type.
44
+
*[4131](https://github.com/nunit/nunit/issues/4131) Platform filter is not inherited. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5166](https://github.com/nunit/nunit/pull/5166)
45
+
46
+
### Internal fixes
47
+
48
+
*[5198](https://github.com/nunit/nunit/issues/5198) Benchmarkdotnet. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5203](https://github.com/nunit/nunit/pull/5203)
49
+
*[5193](https://github.com/nunit/nunit/issues/5193) Update cake to v6.1. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5201](https://github.com/nunit/nunit/pull/5201)
50
+
*[5189](https://github.com/nunit/nunit/issues/5189) Update cake to latest 5.x version. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5190](https://github.com/nunit/nunit/pull/5190)
51
+
*[5186](https://github.com/nunit/nunit/issues/5186) Optimize NUnit's array unpacking. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5202](https://github.com/nunit/nunit/pull/5202)
52
+
*[5182](https://github.com/nunit/nunit/issues/5182) Remove unnecessary NUnit analyzer suppressions from latest analyzer package. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5183](https://github.com/nunit/nunit/pull/5183)
53
+
*[5168](https://github.com/nunit/nunit/issues/5168) Check tests and documentation for the Platform attribute. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5204](https://github.com/nunit/nunit/pull/5204)
54
+
*[5154](https://github.com/nunit/nunit/issues/5154) Apply some internal string optimizations. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5155](https://github.com/nunit/nunit/pull/5155)
55
+
56
+
### The following issues are marked as breaking changes
57
+
58
+
*[4824](https://github.com/nunit/nunit/issues/4824) Convert `TestDelegate` and `ActualValueDelegate` to `Action` and `Func<T>`. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5196](https://github.com/nunit/nunit/pull/5196)
59
+
60
+
> [!IMPORTANT]
61
+
> This issue is a partially breaking change.
62
+
>
63
+
> If you use TestDelegate and Action **explicitly**, you must either:
64
+
> * Alternative 1: Set your target framework to .Net 9.0 or higher
65
+
> * Alternative 2: You must set your language version to 13 or higher, and use the Visual Studio 2022 version 17.12 or higher, or use .Net 9 SDK (which includes the C# 13 compiler), while still targeting .net8 or lower.
0 commit comments