diff --git a/docs/articles/nunit/release-notes/framework.md b/docs/articles/nunit/release-notes/framework.md index f499d67a5..bf03a48d5 100644 --- a/docs/articles/nunit/release-notes/framework.md +++ b/docs/articles/nunit/release-notes/framework.md @@ -7,26 +7,41 @@ uid: frameworkreleasenotes # Framework Release -## NUnit 5.0.0-beta.2 - TBD +## NUnit 5.0.0 - Sept 27, 2026 -There are 33 issues fixed in this release. +NUnit 5 is a major release, with a series of breaking changes that follow up on version 4's move towards a more +type-safe NUnit. + +The breaking changes are summarily documented more clearly in [NUnit 5 - Breaking Changes](xref:v5breakingchanges). + +There are also a series of enhancements, which are summarily documented in [NUnit 5 - New Features](xref:v5newfeatures). + +There are in total 48 issues fixed in this release. ### Enhancements -* [5354](https://github.com/nunit/nunit/issues/5354) Expose an `ActiveTests` property on `TestContext`. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5355](https://github.com/nunit/nunit/pull/5355) +* [5396](https://github.com/nunit/nunit/issues/5396) Allow filtered test dependencies to run when dependent can run. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5421](https://github.com/nunit/nunit/pull/5421) +* [5387](https://github.com/nunit/nunit/issues/5387) Add internal "Lock" polyfill. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5388](https://github.com/nunit/nunit/pull/5388) +* [5354](https://github.com/nunit/nunit/issues/5354) Expose a property for ActiveTests in the TestContext. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5355](https://github.com/nunit/nunit/pull/5355) * [5349](https://github.com/nunit/nunit/issues/5349) Use ArgumentOutOfRangeException throw helper and remove CA1512 diagnostic. Thanks to [Shaurya Srivastava](https://github.com/Shaurya2k06) for [PR 5350](https://github.com/nunit/nunit/pull/5350) * [5348](https://github.com/nunit/nunit/issues/5348) Use ArgumentNullException throw helper and remove CA1510 diagnostic. Thanks to [ANSH SINGH](https://github.com/SinghAnsh07) for [PR 5351](https://github.com/nunit/nunit/pull/5351) -* [5323](https://github.com/nunit/nunit/issues/5323) Report compiler error when asserting non-attribute in `Has.Attribute()`. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5322](https://github.com/nunit/nunit/pull/5322) +* [5323](https://github.com/nunit/nunit/issues/5323) Report compiler error when asserting non-attribute in `Has.Attribute<T>()`. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5322](https://github.com/nunit/nunit/pull/5322) * [5316](https://github.com/nunit/nunit/issues/5316) Add .net 10 as target. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5317](https://github.com/nunit/nunit/pull/5317) +* [5267](https://github.com/nunit/nunit/issues/5267) Remove the `OverloadResolutionPriority` attributes added to support the transition to Action and Func-based APIs. * [5260](https://github.com/nunit/nunit/issues/5260) Add a "warning" threshold to the `MaxTime` attribute. Thanks to [Ricardo Macedo](https://github.com/RicardoMacedo-prj) for [PR 5261](https://github.com/nunit/nunit/pull/5261) * [5220](https://github.com/nunit/nunit/issues/5220) Repeat test cases with threshold-based success/failure. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5318](https://github.com/nunit/nunit/pull/5318) * [4857](https://github.com/nunit/nunit/issues/4857) Drop .NET 6 as a build target of the framework. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 4884](https://github.com/nunit/nunit/pull/4884) * [4717](https://github.com/nunit/nunit/issues/4717) Provide generic type definitions for `TestCaseData` to make it type safe. Thanks to [Jonathan Gilbert](https://github.com/logiclrd) for [PR 5138](https://github.com/nunit/nunit/pull/5138) * [4384](https://github.com/nunit/nunit/issues/4384) Assert.ThrowsAsync, Assert.CatchAsync, and Assert.DoesNotThrowAsync should be awaitable. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5268](https://github.com/nunit/nunit/pull/5268) * [3947](https://github.com/nunit/nunit/issues/3947) Simplify asserting ArgumentException.ParamName. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5304](https://github.com/nunit/nunit/pull/5304) +* [51](https://github.com/nunit/nunit/issues/51) Test Dependency Attribute. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5386](https://github.com/nunit/nunit/pull/5386) ### Bug fixes +* [5415](https://github.com/nunit/nunit/issues/5415) DelayedConstraintTests reuses a disposed static wait handle on a second fixture execution. Thanks to [Neil Colvin](https://github.com/oznetmaster) for [PR 5417](https://github.com/nunit/nunit/pull/5417) +* [5414](https://github.com/nunit/nunit/issues/5414) Stream equality compares stale pooled-buffer bytes beyond the end of the streams. Thanks to [Neil Colvin](https://github.com/oznetmaster) for [PR 5416](https://github.com/nunit/nunit/pull/5416) +* [5406](https://github.com/nunit/nunit/issues/5406) Assert.Ignore: Warnings should be displayed. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5405](https://github.com/nunit/nunit/pull/5405) +* [5401](https://github.com/nunit/nunit/issues/5401) A by-ref-returning property on an exception crashes the test host on .NET Framework. Thanks to [Marko Lahma](https://github.com/lahma) for [PR 5402](https://github.com/nunit/nunit/pull/5402) * [5341](https://github.com/nunit/nunit/issues/5341) Confusing difference in Run Settings display between NUnitLite and ConsoleRunner. Thanks to [Amir Tahan](https://github.com/AmirTahan80) for [PR 5361](https://github.com/nunit/nunit/pull/5361) * [5324](https://github.com/nunit/nunit/issues/5324) C++/CLI compiler warning C4642 in EqualNumericConstraint and EqualNumericWithoutUsingConstraint. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5321](https://github.com/nunit/nunit/pull/5321) * [5273](https://github.com/nunit/nunit/issues/5273) Verify that generic AssignableToConstraint and AssignableFromConstraint works as expected. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5277](https://github.com/nunit/nunit/pull/5277) @@ -34,31 +49,37 @@ There are 33 issues fixed in this release. * [5247](https://github.com/nunit/nunit/issues/5247) Assert for null-valued `dynamic` variables doesn't work in 4.6.0. * [4320](https://github.com/nunit/nunit/issues/4320) AssemblyHelper throws Exception when loading dynamically compiled Assemblies. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5308](https://github.com/nunit/nunit/pull/5308) * [3849](https://github.com/nunit/nunit/issues/3849) Assert.Catch inside Assert.Multiple gives unclear failure message. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5280](https://github.com/nunit/nunit/pull/5280) +* [3248](https://github.com/nunit/nunit/issues/3248) Null dereference in TestWorkerThreadProc. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5374](https://github.com/nunit/nunit/pull/5374) +* [2789](https://github.com/nunit/nunit/issues/2789) No tests run when nested classes in generic fixture. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5370](https://github.com/nunit/nunit/pull/5370) * [1001](https://github.com/nunit/nunit/issues/1001) Too many Inconclusive test results. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5251](https://github.com/nunit/nunit/pull/5251) ### Refactorings * [5273](https://github.com/nunit/nunit/issues/5273) Verify that generic AssignableToConstraint and AssignableFromConstraint works as expected. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5277](https://github.com/nunit/nunit/pull/5277) -* [5222](https://github.com/nunit/nunit/issues/5222) AssemblyVersion. * [5180](https://github.com/nunit/nunit/issues/5180) Change namespace for legacy String-, Collection-, File- and DirectoryAssert classes. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5181](https://github.com/nunit/nunit/pull/5181) ### Internal fixes +* [5425](https://github.com/nunit/nunit/issues/5425) Remove remaining .NET 6 build references. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5426](https://github.com/nunit/nunit/pull/5426) +* [5398](https://github.com/nunit/nunit/issues/5398) Suppress namespace messages where it is intentional. Also suppress primary constructor warnings. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5399](https://github.com/nunit/nunit/pull/5399) * [5301](https://github.com/nunit/nunit/issues/5301) Update README and nuspec files for NUnit 5. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5302](https://github.com/nunit/nunit/pull/5302) * [5228](https://github.com/nunit/nunit/issues/5228) Set assembly version to Minver default for the 5.0.0.0 release. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5299](https://github.com/nunit/nunit/pull/5299) -* [5222](https://github.com/nunit/nunit/issues/5222) AssemblyVersion. +* [5222](https://github.com/nunit/nunit/issues/5222) Follow the .NET versioning guidance for assembly versions: `AssemblyVersion` is now Major.0.0.0, so it stays 5.0.0.0 for all NUnit 5.x releases. * [5197](https://github.com/nunit/nunit/issues/5197) Add files to support AI agent coding. Thanks to [Joel Dickson](https://github.com/joeldickson) for [PR 5225](https://github.com/nunit/nunit/pull/5225) ### Deprecated features +* [5378](https://github.com/nunit/nunit/issues/5378) Deprecate the `Order` attribute. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5384](https://github.com/nunit/nunit/pull/5384) +* [5373](https://github.com/nunit/nunit/issues/5373) Eliminate forced stop from the API. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5374](https://github.com/nunit/nunit/pull/5374) * [5265](https://github.com/nunit/nunit/issues/5265) 4.6 breaks our tests because of TestDelegate / Action ambiguity. * [5263](https://github.com/nunit/nunit/issues/5263) Deprecate non-generic CollectionTally class and move the result class out of nested class. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5310](https://github.com/nunit/nunit/pull/5310) * [5253](https://github.com/nunit/nunit/issues/5253) Remove TestDelegate and ActualValueDelegate. Thanks to NUnit Team member [Terje Sandstrom](https://github.com/OsirisTerje) for [PR 5262](https://github.com/nunit/nunit/pull/5262) ### Others +* [5391](https://github.com/nunit/nunit/issues/5391) Add missing test coverage for method dependencies on generic methods. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5392](https://github.com/nunit/nunit/pull/5392) +* [5367](https://github.com/nunit/nunit/issues/5367) Eliminate StopRun(bool) method from .NET Core builds. Thanks to [CharliePoole](https://github.com/CharliePoole) for [PR 5369](https://github.com/nunit/nunit/pull/5369) * [5271](https://github.com/nunit/nunit/issues/5271) Update Collection Equivalency performance tests to use MaxTime. Thanks to [Silva Dev BR](https://github.com/Will-thom) for [PR 5276](https://github.com/nunit/nunit/pull/5276) -* [5267](https://github.com/nunit/nunit/issues/5267) Remove the `OverloadResolutionPriority` attributes added to support the transition to Action and Func-based APIs. * [5218](https://github.com/nunit/nunit/issues/5218) Feat/allow custom comparer null self. * [5145](https://github.com/nunit/nunit/issues/5145) Remove the `object?` overloads for `Is.SameAs` and underlying constraint. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5160](https://github.com/nunit/nunit/pull/5160) * [5007](https://github.com/nunit/nunit/issues/5007) Create generic type checking constraints. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5191](https://github.com/nunit/nunit/pull/5191) @@ -66,6 +87,8 @@ There are 33 issues fixed in this release. ### The following issues are marked as breaking changes +* [5373](https://github.com/nunit/nunit/issues/5373) Eliminate forced stop from the API. Thanks to NUnit Team member [Manfred Brands](https://github.com/manfred-brands) for [PR 5374](https://github.com/nunit/nunit/pull/5374) +* [5367](https://github.com/nunit/nunit/issues/5367) Eliminate StopRun(bool) method from .NET Core builds. Thanks to [CharliePoole](https://github.com/CharliePoole) for [PR 5369](https://github.com/nunit/nunit/pull/5369) * [5323](https://github.com/nunit/nunit/issues/5323) Report compiler error when asserting non-attribute in `Has.Attribute<T>()`. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5322](https://github.com/nunit/nunit/pull/5322) * [5265](https://github.com/nunit/nunit/issues/5265) 4.6 breaks our tests because of TestDelegate / Action ambiguity. * [5263](https://github.com/nunit/nunit/issues/5263) Deprecate non-generic CollectionTally class and move the result class out of nested class. Thanks to NUnit Team member [Steven Weerdenburg](https://github.com/stevenaw) for [PR 5310](https://github.com/nunit/nunit/pull/5310) @@ -114,24 +137,31 @@ A special thank you to the following reporters for identifying issues: + - + + + + + + + - + - +
ashes999 CharliePoole Heath Stewart HFJoel Dickson
Joel DicksonJoseph Musser MaceWinduManfred Brands
Marko Lahma Mikkel Nylander BundgaardNeil Colvin Patrick StevensPer Rovegård
Per Rovegård R. Miller Rachid Rob ProuseSteven Weerdenburg
Steven Weerdenburg Terje Sandstrom
@@ -140,42 +170,73 @@ and to the commenters who engaged in discussions and offered further insights: + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + + + + + - + + - +
Ace Olszowka Amir TahanAndrew Brown ANSH SINGH
ashes999Austin HowardCandy Chiu CharliePoole
Chris Maddockcirca1741DannyBraigEspen Halsaa Albrektsen
Flynn1179fraser addison HFJeff Cave
Jez Joel DicksonJohan Larsson Jonathan Gilbert
Joseph MusserLeo Shine m4ggoMaceWindu
MaceWindu Manfred BrandsMarko Lahma MartinFayRAX Mike Parker
Mikkel Nylander BundgaardNeil Colvin Ondřej Sekáč Patrick StevensPer Rovegård
Per Rovegård R. Miller RachidRafael Ladeira
Ricardo Macedo Rob ProuseRussell SmithSebastiaan Dammann
Russell SmithSebastian Nawara Shaurya SrivastavaShawn Silva Dev BRSteven Weerdenburg
Steven Weerdenburg Terje Sandstrom