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
dll not found, native transitive dependency #4343
Comments
I got the similar issue on a net48 c# project. The dll could be found 1 day ago and nothing changed. Then suddenly, it can't find the dll in bin/debug folder but using dir or diagnostic option can confirm that the needed dll is in that folder. In the VsBuild task, it also logs that that dll was copied to the right folder. NUnit Adapter 4.3.1.0 is used in my case. Microsoft (R) Test Execution Command Line Tool Version 17.5.0. My solution: For my case, It turns out that it was caused by the latest update of Windows Server 2022 (20230314) image running on Azure agent which no longer has Microsoft Visual C++ 2010 Redistributable package pre-installed. So preinstalling that fixed my issue. |
Same issue happened to my team last week. CI failed during testing with no related changes, and consistently failed from then on out. |
@coonsd I'm having the same issue. Is there a workaround? |
Description
Our unit test project is targeting net47, using xunit and xunit.runner.visualstudio. The test has a transitive dependency that is native (Yubico.NativeShims), but the dll isn't being copied to the test directory resulting in a failed test with the message:
However, if you look at the build directory (
bin\Debug\net47
) you'll see that Yubico.NativeShims.dll is present. I’m opening this issue in vstest as it appears the vstest project is responsible for creating and staging the temporary test directory.Our team owns Yubico.NativeShims, and we are using the
buildtransitive
NuGet directive to specify a targets file that copies over the native dependency for native users (see the Yubico.NativeShims project for more information).Steps to reproduce
I created this project to demonstrate the issue. First build the solution (config: debug, any CPU). Next, run the one unit test in the project,
ComputeSharedSecretTests.ComputeSecret_Matches()
.Expected behavior
The test passes.
Actual behavior
The test fails, and in the test results you'll see the following message:
Diagnostic logs
Environment
Windows 11, OS Build: 22621.1265
Test Execution Command Line Tool Version 17.4.1-release-20221129-02 (x64)
The text was updated successfully, but these errors were encountered: