stryker-net
stryker-net copied to clipboard
Stryker.NET throws Unhandled exception. System.IO.FileNotFoundException
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:
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.
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?
Removing the solution file parameter does not change anything. Same result.
dotnet test
result:
dotnet vstest
result:
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.
Other projects as references are not a problem, especially not when you specify which project to test explicitly.
@Lutti1988 is this still an issue in the latest version?
assumed issue is fixed