mercredi 14 septembre 2016

Could not load file or assembly 'Assembly.dll' - vstest

I have such error when launching one unit test: Test method TestName threw exception: System.IO.FileNotFoundException: Could not load file or assembly 'Implementation.dll' or one of its dependencies. The specified module could not be found.

This issue occurs only when using vstest.console.exe. It doesn't occur when I run my test through Visual Studio (2013). I know that vstest.executionengine.exe is run when running tests through Visual Studio. Logs for it can be enabled in vstest.executionengine.exe.config file (but it doesn't give me any useful information).

I already used Dependency Walker as suggested in many other questions of these type: Dependency Walker screenshot And I see that I have all dlls colored to red in System32 directory or in the program execution directory (Dependency walker thinks that they are missing). Execution of tests looks like this:

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "dll1.dll" "dll2.dll" (etc. for all dlls with tests) /InIsolation /UseVsixExtensions:false /Platform:x86 /Framework:framework40 /Logger:trx /Tests:TestName (and all possible missing dlls, only not API-MS-WIN(...) named dlls are in TestWindow or System32 directory). I have already checked. I have Microsoft Visual C++ Redistributable 2008, 2010, 2012 and 2013 installed in both x86 and x64 versions.

Aucun commentaire:

Enregistrer un commentaire