Skip to content

NUnit failed to load test assembly after upgrading from 4.3.1 to 4.4.0 #1070

@kbeaugrand

Description

@kbeaugrand

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions