NUnit 5.0.0

Prefix Reserved

Requires NuGet 2.12 or higher.

dotnet add package NUnit --version 5.0.0
                    
NuGet\Install-Package NUnit -Version 5.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NUnit" Version="5.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NUnit" Version="5.0.0" />
                    
Directory.Packages.props
<PackageReference Include="NUnit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NUnit --version 5.0.0
                    
#r "nuget: NUnit, 5.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NUnit@5.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NUnit&version=5.0.0
                    
Install as a Cake Addin
#tool nuget:?package=NUnit&version=5.0.0
                    
Install as a Cake Tool

NUnit 5 Framework

Follow NUnit Slack Open Issues NUnit issues marked with "help wanted" label NUnit issues marked with "good first issue" label

NUnit is a unit-testing framework for all .NET languages. It can run on MacOS, Linux and Windows operating systems. NUnit can be used for a wide range of testing, from unit testing with TDD to full fledged system and integration testing. It is a non-opinionated, broad and deep framework with multiple different ways to assert that your code behaves as expected. Many aspects of NUnit can be extended to suit your specific purposes.

The latest version, version 5, is an upgrade from the groundbreaking NUnit 3 and NUnit 4 frameworks. It is a modernized version, aimed at taking advantage of the latest .NET features and C# language constructs.

If you are upgrading from NUnit 3, be aware of the breaking changes. Please see the NUnit 4 Migration Guide and take care to prepare your NUnit 3 code before you do the upgrade. If you're upgrading from NUnit 4, please check the release notes for version 5 (https://docs.nunit.org/articles/nunit/release-notes/framework.html).

Downloads

You can download the latest stable release version GitHub release date as NuGet Version (NuGet downloads), or the latest developer build as MyGet version.

To pull developer builds from MyGet, add this line to your packageSources section in nuget.config:

  <add key="nunit-myget" value="https://www.myget.org/F/nunit/api/v3/index.json" />

More info on downloading

Documentation

Documentation for all NUnit projects can be found at the documentation site.

Contributing

For more information on contributing to the NUnit project, please see CONTRIBUTING.md and the Developer Docs.

NUnit 4.X and 5.X are being developed by the NUnit teams and numerous community contributors. A complete list of contributors since NUnit migrated to GitHub can be found on GitHub.

NUnit 3.0 was created by Charlie Poole, Rob Prouse, Simone Busoli, Neil Colvin and numerous community contributors.

Earlier versions of NUnit were developed by Charlie Poole, James W. Newkirk, Alexei A. Vorontsov, Michael C. Two and Philip A. Craig.

License

NUnit is open source software, and all NUnit components are released under the MIT license. Some earlier releases used the NUnit license. Both of these licenses allow the use of NUnit in free and commercial applications and libraries without restrictions.

NUnit Projects

NUnit is made up of several projects. When reporting issues, please try to report issues in the correct project.

Core Projects

  • NUnit Test Framework - The test framework used to write NUnit tests (this repository)
  • NUnit Visual Studio Adapter - Visual Studio/Dotnet adapter for running NUnit 3 and higher in Visual Studio or the dotnet command line.
  • NUnit Analyzers - Roslyn analyzers for NUnit tests, providing code analysis and refactoring support in Visual Studio and other IDEs that support Roslyn analyzers.
  • NUnit Console and Engine - Runs unit tests from the command line and provides the engine that is used by other test runners to run NUnit tests.

Visual Studio Extensions

NUnit Engine Extensions

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1.4K)

Showing the top 5 NuGet packages that depend on NUnit:

Package Downloads
SpecFlow.NUnit

Package to use SpecFlow with NUnit 3.13 and later

Microsoft.Playwright.NUnit

Playwright enables reliable end-to-end testing for modern web apps. This package brings in additional helpers and fixtures to enable using it within NUnit.

AutoFixture.NUnit3

By leveraging some features of NUnit3, this extension turns AutoFixture into a declarative framework for writing unit tests. In many ways it becomes a unit testing DSL (Domain Specific Language).

Xamarin.UITest

UI Automation Framework for testing Android and iOS apps.

Reqnroll.NUnit

Package to use Reqnroll with NUnit 3.13 and later.

GitHub repositories (1.5K)

Showing the top 20 popular GitHub repositories that depend on NUnit:

Repository Stars
icsharpcode/ILSpy
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
jasontaylordev/CleanArchitecture
Clean Architecture Solution Template for ASP.NET Core
ppy/osu
rhythm is just a *click* away!
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
chocolatey/choco
Chocolatey - the package manager for Windows
MudBlazor/MudBlazor
Blazor Component Library based on Material Design principles. Do more with Blazor, utilizing CSS and keeping JavaScript to a bare minimum.
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 11, 10, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
nopSolutions/nopCommerce
ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.
unoplatform/uno
Open-source platform for building cross-platform native Mobile, Web, Desktop, and Embedded apps from a single C#/XAML codebase. Work from any IDE/CLI with Hot Reload, Visual Designer, MCPs, and Skills built for modern .NET workflows. 200M+ NuGet downloads.
MahApps/MahApps.Metro
A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
AssetRipper/AssetRipper
GUI application to analyze game files
gitextensions/gitextensions
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
TheAlgorithms/C-Sharp
All algorithms implemented in C#.
MassTransit/MassTransit
Distributed Application Framework for .NET
Prowlarr/Prowlarr
Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps, supporting management of both Torrent Trackers and Usenet Indexers.
quartznet/quartznet
Quartz Enterprise Scheduler .NET
jstedfast/MailKit
A cross-platform .NET library for IMAP, POP3, and SMTP.
MessagePack-CSharp/MessagePack-CSharp
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
ScottPlot/ScottPlot
Interactive plotting library for .NET
pardeike/Harmony
A library for patching, replacing and decorating .NET and Mono methods during runtime
Version Downloads Last Updated
5.0.0 1,892,456 9/27/2026
5.0.0-beta.1 49,531 7/4/2026
4.6.1 19,121,124 5/19/2026
4.6.0 2,220,069 5/3/2026
4.5.1 9,335,551 3/6/2026
4.5.0 2,227,563 2/18/2026
4.4.0 30,819,715 8/10/2025
4.3.2 40,175,453 12/28/2024
4.3.1 5,624,440 12/21/2024
4.3.0 1,267,725 12/14/2024
4.2.2 26,052,523 8/31/2024
4.2.1 1,839,666 8/23/2024
4.1.0 27,935,930 2/25/2024
4.0.1 11,086,342 12/2/2023
3.14.0 52,003,576 11/3/2023
Loading failed