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 failed to load test assembly after upgrading from 4.3.1 to 4.4.0 #1070

Closed
kbeaugrand opened this issue Mar 1, 2023 · 3 comments
Closed

Comments

@kbeaugrand
Copy link

After Bumping the nuget package from 4.3.1 to 4.4.0 we are facing this issue:
Both command line and Visual Studio are unable to launch the Unit tests ont our project.

Visual Studio "see" the test collection but is unable to launch it.

On github action we have the following logs:

Build started 02/2[7](https://github.com/CGI-FR/IoT-Hub-Portal/actions/runs/4286108441/jobs/7465242392#step:9:8)/2023 19:31:40.
     1>Project "/home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal/src/AzureIoTHub.Portal.sln" on node 1 (VSTest target(s)).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Debug|Any CPU".
Test run for /home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal/src/AzureIoTHub.Portal.Tests.Unit/bin/Debug/net7.0/AzureIoTHub.Portal.Tests.Unit.dll (.NETCoreApp,Version=v7.0)
Microsoft (R) Test Execution Command Line Tool Version 17.5.0 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
NUnit Adapter 4.4.0.0: Test execution started
Running all tests in /home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal/src/AzureIoTHub.Portal.Tests.Unit/bin/Debug/net7.0/AzureIoTHub.Portal.Tests.Unit.dll
   NUnit failed to load /home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal/src/AzureIoTHub.Portal.Tests.Unit/bin/Debug/net7.0/AzureIoTHub.Portal.Tests.Unit.dll
NUnit Adapter 4.4.0.0: Test execution complete
No test is available in /home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal/src/AzureIoTHub.Portal.Tests.Unit/bin/Debug/net7.0/AzureIoTHub.Portal.Tests.Unit.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Results File: /home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal/src/AzureIoTHub.Portal.Tests.Unit/TestResults/_fv-az362-[8](https://github.com/CGI-FR/IoT-Hub-Portal/actions/runs/4286108441/jobs/7465242392#step:9:9)14_2023-02-27_1[9](https://github.com/CGI-FR/IoT-Hub-Portal/actions/runs/4286108441/jobs/7465242392#step:9:10)_31_47.trx

     1>Done Building Project "/home/runner/work/IoT-Hub-Portal/IoT-Hub-Portal/src/AzureIoTHub.Portal.sln" (VSTest target(s)).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:07.[23](https://github.com/CGI-FR/IoT-Hub-Portal/actions/runs/4286108441/jobs/7465242392#step:9:24)

The bump was introduced at this PR via Dependabot: CGI-FR/IoT-Hub-Portal#1815

  • NUnit and NUnit3TestAdapter versions
    • Microsoft (R) Test Execution Command Line Tool Version 17.5.0 (x64)
    • NUnit Adapter 4.4.0.0
  • Visual Studio edition and full version number (see Help About)
    • N/A
  • A short repro, preferably attached or pointing to a git repo or gist
    The exact repo is https://github.com/CGI-FR/IoT-Hub-Portal
  • What .net platform and version is being targeted
    • .NETCoreApp,Version=v7.0
  • If TFS/VSTS issue, what version, hosted or on-premises, and what build task you see this in
    • N/A
@OsirisTerje
Copy link
Member

Please see issues #1065, #1066 and #1069, and NUnit.Engine issue nunit/nunit-console#1324
There is a dev version attached to the two first issues, appreciate if you check that that one works.

We will try to get this hotfix out this evening.

@kbeaugrand
Copy link
Author

kbeaugrand commented Mar 1, 2023

@OsirisTerje I tested the 4.4.1 (pre-release) of the package.

That's working on my side.
I'll wait for this version ;)

Thank you for your help.

--- EDIT
I tested the 4.4.1-alpha.1 coming from #1065

@OsirisTerje OsirisTerje mentioned this issue Mar 1, 2023
@OsirisTerje OsirisTerje added this to the 4.4.1 milestone Mar 1, 2023
@OsirisTerje
Copy link
Member

Hotfix version 4.4.2, nearly identical to the alpha version attached yesterday, is now released. The difference from the attached version is that the Microsoft.Extensions.DependencyModel is not included in the adapter package. It is not needed there, so it was removed. The release notes is here https://docs.nunit.org/articles/vs-test-adapter/AdapterV4-Release-Notes.html (includes some more explanations) and the package is uploaded to nuget https://www.nuget.org/packages/NUnit3TestAdapter/4.4.2. Thanks, everyone for reporting and providing repros!

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