Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 Framework Driver not picked up #51

Open
nataliaheliova opened this issue Apr 12, 2022 · 1 comment
Open

V2 Framework Driver not picked up #51

nataliaheliova opened this issue Apr 12, 2022 · 1 comment

Comments

@nataliaheliova
Copy link

Hey there,

I have a .NET 6.0 console project which references NUnit.Engine 3.14.0 and NUnit.Extension.NUnitV2Driver 3.9.0. When I try to run NUnit2 tests from test assembly (targeting .NET Framework 4.8, referencing NUnit 2.6.4), I get the following result:

Either assembly contains no tests or proper test driver has not been found.

According to the documentation, V2 Framework Driver should be used automatically if installed. Am I missing something?

Please find attached solution which can be used to reproduce the issue.
NUnit3_Repro.zip

@CharliePoole
Copy link
Member

There are two problems:

  1. The driver is being referenced by your project rather than being installed as an engine extension. Normally extensions are not referenced in this way. I recognize that you may be using the reference simply to get the extension to be copied to the correct directory, however.

  2. Your project is targeting .NET 6.0, the engine reference pulls in the a .NET Core version of the engine. The extension, OTOH, targets the .NET 2.0 framework. So even if it is installed in the correct place, it cannot be loaded.

The extension works for various runners, which target versions of the .NET Framework. It has never been ported to .NET Standard or Core, because the existing runners don't need it.

There's an open question as to whether we'll continue to support V2 tests in future versions (4.x) or the engine. I'll go ahead and create a new issue to address that.

I'm closing this as "Not a bug" but if you disagree or have more comments, you can still post them hear and I'll respond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants