Skip to content

NUnit3 Module call to console runner fails with FileLoadException #2600

@pchinery

Description

@pchinery

Description

Suddenly, our NUnit 3 Console runner started to fail with an FileLoadException for nunit.engine.api with the message "Provider DLL failed to initialize correctly" (HRESULT: 0x8009001D).

This most likely happened after an update to dotnet 5.0.301. We had to update MSBuild.StructuredLogger, because the log format had changed. With that being the only change in our dependencies, the error now appears and the code is unchanged otherwise. So the most likely root cause is the dotnet update.

Repro steps

I have created a sample repo which fails on multiple machines with dotnet 5.0.301. It contains two test targets. Both should do the same, but the manual process creation works while the NUnit module fails with the given exeception. The parameter lists are identical and even using a parameter file (like the module does) does not change the result.

Expected behavior

The whole build script should execute successfully and both test targets should run all tests.

Actual behavior

The target Test2 fails with an FileLoadException for nunit.engine.api with the message "Provider DLL failed to initialize correctly" (HRESULT: 0x8009001D).

Known workarounds

Calling NUnit manually (as in Test1) does help (for whatever reason).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions