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

nunit-console 3.18.* fails on a mixed wpf net48 and netstandard2.0 project #1515

Open
oscgu opened this issue Nov 15, 2024 · 0 comments
Open

Comments

@oscgu
Copy link

oscgu commented Nov 15, 2024

To follow up on my previous comment here (#1465 (comment)):
I have now created a minimal project with which the issue can be reproduced repro.zip.
Additionally I added a small script run.ps1 that downloads the console-runner, does a nuget restore, builds the solution and then starts the console-runner.
With and without tests in the project, the following error always appears:

Time Elapsed 00:00:02.34
NUnit Console Runner 3.18.3 (Release)
Copyright (c) 2022 Charlie Poole, Rob Prouse
Friday, November 15, 2024 9:16:32 PM

Runtime Environment
   OS Version: Microsoft Windows NT 6.2.9200.0
   Runtime: .NET Framework CLR v4.0.30319.42000

Test Files
    .\\nunit-issue-repro.sln


Errors, Failures and Warnings

1) Error : C:\tmp\Library\bin\Debug\netstandard2.0\Library.dll
System.ArgumentException : The netcore-4.5 framework is not available for X86=False.
Available frameworks: net-4.0 net-4.5 net-4.5.1 net-4.5.2 net-4.6 net-4.6.1 net-4.6.2 net-4.7 net-4.7.1 net-4.7.2 net-4.8 netcore-6.0 netcore-8.0
--ArgumentException
The netcore-4.5 framework is not available for X86=False.
Available frameworks: net-4.0 net-4.5 net-4.5.1 net-4.5.2 net-4.6 net-4.6.1 net-4.6.2 net-4.7 net-4.7.1 net-4.7.2 net-4.8 netcore-6.0 netcore-8.0
   at NUnit.Engine.Services.TestAgency.GetAgent(TestPackage package) in D:\a\nunit-console\nunit-console\src\NUnitEngine\nunit.engine\Services\TestAgency.cs:line 71
   at NUnit.Engine.Runners.ProcessRunner.CreateAgentAndRunnerIfNeeded() in D:\a\nunit-console\nunit-console\src\NUnitEngine\nunit.engine\Runners\ProcessRunner.cs:line 250
   at NUnit.Engine.Runners.ProcessRunner.RunTests(ITestEventListener listener, TestFilter filter) in D:\a\nunit-console\nunit-console\src\NUnitEngine\nunit.engine\Runners\ProcessRunner.cs:line 138

Test Run Summary
  Overall result: Failed
  Test Count: 0, Passed: 0, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0
  Start time: 2024-11-15 20:16:32Z
    End time: 2024-11-15 20:16:33Z
    Duration: 0.513 seconds
                                                                                                                                                                                                                                                                   

I also tried to debug this a little bit and it does seem to make it past the offending line (https://github.com/nunit/nunit-console/blob/main/src/NUnitEngine/nunit.engine/Services/TestAgency.cs#L63) if the vs-project-loader extension is not present, though then it fails because the "File type is not supported".
Now I'm stuck on getting the extension loaded/debugged in conjunction with the console-runner.

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