Skip to content

NUnit Analyzers 4.11 - October 28, 2025

Choose a tag to compare

@mikkelbumikkelbu released this 28 Oct 22:17
· 68 commits to master since this release
c22561b

NUnit Analyzers 4.11 - October 28, 2025

This release of the NUnit Analyzers includes improvements and fixes related to IDisposable handling and initialization
in SetUp and OneTimeSetUp methods. It also introduces the ability to configure additional methods that should be
treated as SetUp and TearDown methods by the analyzers. This can be done in the .editorconfig, and there are four
configurations for this:

  • dotnet_diagnostic.NUnit.additional_setup_methods
  • dotnet_diagnostic.NUnit.additional_teardown_methods
  • dotnet_diagnostic.NUnit.additional_one_time_setup_methods
  • dotnet_diagnostic.NUnit.additional_one_time_teardown_methods

Each configuration accepts a list of method names, separated by commas, semicolons, or spaces. For example:

dotnet_diagnostic.NUnit.additional_setup_methods = CustomSetup, MyInit

As in recent releases, a major part of this work was contributed by @manfred-brands.

The release contains contributions from the following users (in alphabetical order):

Issues Resolved

Features and Enhancements

  • #921 NUnit1032 - disposals in overridden methods not detected
  • #919 NUnit1032/NUnit3002 - local functions not analyzed
  • #918 NUnit2045 - false positive for inline usings
  • #911 NUnit3002 doesn't recognize the using statement.
  • #910 using declarations not recognized by NUnit2045

Bugs

  • #922 NUnit1001 - false positive for arguments with generic parameters
  • #914 Wrong position of NUnit1001 diagnostic for TestCase with four parameters or more

Tooling, Process, and Documentation

  • #926 chore: Bump NUnit3TestAdapter
  • #908 chore: bump version
  • #885 Bump to NUnit version 4.4 when this is released