Support for .net 5
See original GitHub issueDescribe the bug stryker does not support .net5 framework. The issue is with the library used by Stryker (Buildalyzer). The BuildAnalyzer is parsing the targetframework of the project and while parsing the target framework it does not the get format it needs which is netcoreappx.x
Logs dotnet stryker --solution-path <solution_path> --reporters “[‘json’]”
/ | | | | | \ | | | | | ( | | _ __ _ | | _____ _ __ | | | | | | _ | | '| | | | |/ / _ \ '| | . ` | | | | ) | || | | || | < / | | |\ | | | | |_/ _|| _, ||____|| ()|| _|____| || / | |/
Version: 0.20.0 (beta)
[16:05:42 INF] Identifying project to mutate.
[16:05:42 ERR] An error occurred during the mutation test run
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.String.get_Chars(Int32 index)
at Buildalyzer.Environment.EnvironmentFactory.IsFrameworkTargetFramework(String targetFramework)
at Buildalyzer.Environment.EnvironmentFactory.<OnlyTargetsFramework>b__11_0(String x)
at System.Linq.Enumerable.All[TSource](IEnumerable1 source, Func
2 predicate)
at Buildalyzer.Environment.EnvironmentFactory.OnlyTargetsFramework(String targetFramework)
at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework, EnvironmentOptions options)
at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework)
at Buildalyzer.ProjectAnalyzer.Build(String targetFramework)
at Buildalyzer.ProjectAnalyzer.Build()
at Stryker.Core.Initialisation.ProjectFileReader.AnalyzeProject(String projectFilePath, String solutionFilePath) in D:\a\1\s\src\Stryker.Core\Stryker.Core\Initialisation\ProjectFileReader.cs:line 47r.cs:line 47
at Stryker.Core.Initialisation.InputFileResolver.ResolveInput(StrykerOptions options) in D:\a\1\s\src\Stryker.Core\Stryker.Core\Initialisation\InputFileResolver.cs:line 74
at Stryker.Core.Initialisation.InitialisationProcess.Initialize(StrykerOptions options) in D:\a\1\s\src\Stryker.Core\Stryker.Core\Initialisation\InitialisationProcess.cs:line 43
at Stryker.Core.StrykerRunner.RunMutationTest(StrykerOptions options, IEnumerable`1 initialLogMessages) in D:\a\1\s\src\Stryker.Core\Stryker.Core\StrykerRunner.cs:line 66
[16:05:42 INF] Time Elapsed 00:00:00.5388895
Expected behavior Should be able to run without any error
Desktop (please complete the following information):
- OS: Windows
- Type of project core
- Framework Version .net5
- Stryker Version: 0.20.0 (beta)
Additional context Not sure if its an issue or enhancement
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Thank @daveaglick and @slang25 😉
@pankti11 the fix has just been released