stryker-net: Stryker hanging when running on stryker sln
Describe the bug
When running dotnet stryker on stryker itself we get an unexpected exception:
Version: 3.10.0
[10:46:16 INF] Analysis starting.
[10:46:16 INF] Identifying projects to mutate in C:\Dev\Repos\stryker-net\src\Stryker.sln. This can take a while.
[10:46:17 WRN] Analysis of project Stryker.RegexMutators\Stryker.RegexMutators\Stryker.RegexMutators.csproj failed.
[10:46:17 WRN] Analysis of project Stryker.RegexMutators\Stryker.RegexMutators.UnitTest\Stryker.RegexMutators.UnitTest.csproj failed.
[10:46:17 WRN] Analysis of project Stryker.CLI\Stryker.CLI\Stryker.CLI.csproj failed.
[10:46:17 WRN] Analysis of project Stryker.CLI\Stryker.CLI.UnitTest\Stryker.CLI.UnitTest.csproj failed.
[10:46:17 WRN] Analysis of project Stryker.Core\Stryker.Core\Stryker.Core.csproj failed.
[10:46:17 WRN] Analysis of project Stryker.Core\Stryker.Core.UnitTest\Stryker.Core.UnitTest.csproj failed.
[10:46:29 INF] Found 1 source projects
[10:46:29 INF] Found 0 test projects
[10:46:29 WRN] Project Stryker.DataCollector\Stryker.DataCollector\Stryker.DataCollector.csproj will not be mutated because Stryker did not find a test project for it.
[10:46:29 INF] Analysis complete.
[10:46:29 INF] Building solution Stryker.sln
[10:47:11 INF] Time Elapsed 00:00:54.9610941
Unhandled exception. System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters, ITestRunner runner)+MoveNext() in /_/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs:line 57
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator) in /_/src/Stryker.Core/Stryker.Core/StrykerRunner.cs:line 61
at Stryker.CLI.StrykerCli.RunStryker(IStrykerInputs inputs) in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 93
at Stryker.CLI.StrykerCli.<>c__DisplayClass10_0.<Run>b__0() in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 68
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass143_0.<OnExecute>b__0(CancellationToken _)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Stryker.CLI.StrykerCli.Run(String[] args) in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 74
at Stryker.CLI.Program.Main(String[] args) in /_/src/Stryker.CLI/Stryker.CLI/Program.cs:line 14
Reproduction
Run stryker in the src/ dir of the stryker repo.
Expected behavior Stryker runs on the solution file and succeeds.
Desktop (please complete the following information):
- OS: Windows
- Type of project: Core
- Framework Version: core 6.0
- Stryker Version 3.10
Additional context
I’ve investigated buildalyzer to be the source of the issue. Somehow buildalyzer fails to build all projects except for DataCollector. However I haven’t figured out WHY buildalyzer is failing to build these projects.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (15 by maintainers)
To test this I cloned stryker fresh on another machine and ran stryker there. It worked! So indeed there seems to be something wrong with my local machine. I’ve tested there on 2 seperate stryker repos and both gave the error. I’ll investige further if this is thanks to local changes like you suggest, or if this is because of the state of my machine
yes, windows update: it also works with the distribution. Do you have the same issue with master/Head ? maybe it is due to some local change(s)