stryker-net icon indicating copy to clipboard operation
stryker-net copied to clipboard

Stryker.NET throws Unhandled exception. System.IO.FileNotFoundException

Open Lutti1988 opened this issue 2 years ago • 3 comments

Describe the bug Stryker runs into problem, whenever I try to run it in an azure devops build pipeline. The following output is produced with the command dotnet stryker --project "MyProject" --solution "MySolution.sln" --reporter "progress" --reporter "json" within the unit test project folder. Weird is, that the DLLs are searched in project/bin/debug/net6.0/ref/ instead of project/obj/debug/net6.0/ref/ , because there is no "ref" folder in bin/debug/x

Logs Output: image

Expected behavior The DLLs should be searched in the correct folder.

Desktop (please complete the following information): Azure DevOps Server 2020 Update 1.1 - .NET 6.0 - dotnet-stryker 2.2.0

Additional context On my local machine (Windows 10 - .NET 6.0 - dotnet-stryker 2.2.0) everything works fine.

Lutti1988 avatar Sep 01 '22 14:09 Lutti1988

As far as I can tell that is your unit test failing to resolve it's dependency. What happens if you run dotnet test and dotnet vstest on that testproject? Also, passing the solution file should not be necessary for a dotnet 6 project when ran from the unit test folder. Could you try running without specifying the solution file?

rouke-broersma avatar Sep 01 '22 16:09 rouke-broersma

Removing the solution file parameter does not change anything. Same result. dotnet test result: image

dotnet vstest result: image

Is there maybe a problem with projects referencing other projects? I have a Project-A, a Project-A-UnitTest and a Project-B. Project-A has Project-B as a reference.

Lutti1988 avatar Sep 02 '22 05:09 Lutti1988

Other projects as references are not a problem, especially not when you specify which project to test explicitly.

rouke-broersma avatar Sep 02 '22 05:09 rouke-broersma

@Lutti1988 is this still an issue in the latest version?

richardwerkman avatar May 26 '23 08:05 richardwerkman

assumed issue is fixed

dupdob avatar Oct 03 '23 13:10 dupdob