-
Notifications
You must be signed in to change notification settings - Fork 150
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
NUnit.ConsoleRunner.NetCore executes test library under wrong runtime version #1380
Comments
Hi @MichalMucek Note that there is still a known issue related to projects requiring certain particular runtimes, with a workaround defined in #1383. If you hit the issue the workaround should work if your tests do not require a non-Windows OS. |
@MichalMucek Have you worked through the comments in the #1374 and see if any of those might apply to you? |
@OsirisTerje Thanks for the tip. |
Today, I installed NUnit.ConsoleRunner.NetCore 3.17.0 (.NET tool) on some other environment. There was a warning message (colored dark yellow), saying File nunit3-console.runtimeconfig.json was still pointing at framework version 6.0.0. |
@MichalMucek I can confirm this, so should be fixed in #1396 |
I'm trying to execute a test library using NUnit Console 3.16.3 (NuGet, .NET Tool) on Windows Server 2019 Datacenter (10.0.17763, x64). There are multiple .NET SDK versions installed on the machine - 6.0.202, 7.0.100, 7.0.309, 8.0.100.
In use are NUnit 3.13.1, NUnit3TestAdapter 4.4.2, and SpecFlow.NUnit 3.9.74.
The TargetFramework of the library is either net7.0-windows10.0.19041.0 or net8.0-windows10.0.19041.0. Each time I execute one of the libraries, .NET 6.0.23 (greatest/latest of the other available 6.0.x) is used for runtime, which results in errors of missing assemblies for the targeted framework or the selected runtime. In the case of net7.0-windows10.0.19041.0, it can reach the point of finding the tests. It is unable to do even that for net8.0-windows10.0.19041.0.
The test library executes with no issues when I set up an environment with .NET 7 or 8 only (or when I make a few tweaks in the appropriate keys of the Windows Registry). Using global.json with a specific .NET SDK version doesn't work.
InternalTrace.9572.Org.App.Specs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (.NET 7).log
InternalTrace.9572 (.NET 7).log
Console output for net7.0-windows10.0.19041.0:
InternalTrace.3312.Org.App.Specs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (.NET 8).log
InternalTrace.3312 (.NET 8).log
Console output for net8.0-windows10.0.19041.0:
The text was updated successfully, but these errors were encountered: