Skip to content

NUnit.ConsoleRunner.NetCore fails to run tests against net10.0 & netstandard2.0 #1822

@Lexy2

Description

@Lexy2

I am migrating our projects to .NET 10, and the agents don't yet have the full nunit-console that supports .NET 10 engine.

I thought I could leverage dotnet tool nunit.console.netcore to run the tests.
It is easy to install as dotnet tool install NUnit.ConsoleRunner.NetCore --create-manifest-if-needed and run as dotnet nunit Tests.dll.

However, when I try to run tests I get an error

SetUp : System.MissingMethodException : Method not found: 'Void Ns.ClientConfiguration.set_HttpClient(System.Net.Http.HttpClient)'.

The HttpClient property is defined on the base class in an assembly targeting netstandard2.0 and is consumed by the tests assembly built against net10.0.

I'm not sure why this happens, but the very same tests run well using dotnet test with NUnit3TestAdapter 5.2.0 and NUnit engine 4.4.0.
Full console also works, so it's only the NetCore version that's affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions