MScottFord.Forks.NUnit.Maui.Runner 2.0.2

dotnet add package MScottFord.Forks.NUnit.Maui.Runner --version 2.0.2
                    
NuGet\Install-Package MScottFord.Forks.NUnit.Maui.Runner -Version 2.0.2
                    
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="MScottFord.Forks.NUnit.Maui.Runner" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MScottFord.Forks.NUnit.Maui.Runner" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="MScottFord.Forks.NUnit.Maui.Runner" />
                    
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 MScottFord.Forks.NUnit.Maui.Runner --version 2.0.2
                    
#r "nuget: MScottFord.Forks.NUnit.Maui.Runner, 2.0.2"
                    
#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 MScottFord.Forks.NUnit.Maui.Runner@2.0.2
                    
#: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=MScottFord.Forks.NUnit.Maui.Runner&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=MScottFord.Forks.NUnit.Maui.Runner&version=2.0.2
                    
Install as a Cake Tool

NUnit MAUI Runner

Runs NUnit tests inside a .NET MAUI app, on a device, simulator or emulator, and reports the results in the app or streams them over TCP for a build to collect.

This is a fork. It exists to publish a build targeting .NET 10 and MAUI 10.

The original is JaneySprings/NUnit-MAUI-Runner by Nikita Romanov, by way of Abhirasmanu-Trimble/NUnit-MAUI-Runner. Only the package id is prefixed: the assembly name and namespaces are unchanged, so code written against the upstream package needs no edits beyond the package reference.

Changes here are not offered upstream. If the upstream project picks .NET 10 up, use that instead.

Supported platforms

net10.0-android and net10.0-ios. Android 5.0 (API 21) or higher, iOS 12.2 or higher.

Installation

dotnet add package MScottFord.Forks.NUnit.Maui.Runner

Usage

Create a configuration class:

class RunnerConfig : IRunnerConfiguration {
    public TestOptions ProvideOption() {
        return new TestOptions() {
            // Paste NUnit options here
            // AutoRun = true
        };
    }
    public IEnumerable<Assembly> ProvideAssemblies() {
        return new List<Assembly> {
            // Paste your assemblies with tests here
        };
    }
}

Add the NUnit app and your configuration class to MauiProgram.cs:

var builder = MauiApp.CreateBuilder();
  builder
      .UseMauiApp<NUnit.Maui.Runner.App>()
      .Services.AddSingleton<IRunnerConfiguration, RunnerConfig>();

return builder.Build();

TestOptions also covers running the suite on launch (AutoRun), exiting when it finishes (TerminateAfterExecution), writing an XML result file, and streaming results to a TCP listener (TcpWriterParameters) so a build can collect them.

Source, issues and contributing

github.com/mscottford/NUnit-MAUI-Runner — see the repository README for how to build it and run its own tests.

Licence

MIT.

Product Compatible and additional computed target framework versions.
.NET net10.0-android36.0 is compatible.  net10.0-ios26.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 104 9/3/2026
2.0.1 99 9/3/2026