-
Notifications
You must be signed in to change notification settings - Fork 581
Description
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.
- Clone https://github.com/pchinery/nunit-bug-hunt
- Ensure that dotnet 5.0.301 is installed
- run
dotnet tool restore - run
dotnet fake build
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).