-
Notifications
You must be signed in to change notification settings - Fork 586
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
NUnit3 Module call to console runner fails with FileLoadException #2600
Comments
Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project! |
having the exact same problem. Trying to run the same cmd line in the terminal succeeds. |
Can you please provide the URL for the repro repository? For Thanks |
Sorry, I somehow pasted the wrong URL in the description. I have updated it now and the correct URL is https://github.com/pchinery/nunit-bug-hunt
The part with |
I'm seeing this too (after an update to .NET 6 in my case). |
I just started getting this issue as well after upgrading to .NET 6. For me commenting out the line "CreateProcess.withEnvironment" in the createProcess function here
I'm not really sure why this was causing the issue as I was just passing an empty list to that function. |
@michaelsmithson Thanks a lot for the hint at that location. It indeed was the cause of the issue. |
The fix has been released in |
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.
dotnet tool restore
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 fornunit.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).The text was updated successfully, but these errors were encountered: