Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for .net 5 #1369

Closed
pankti11 opened this issue Jan 11, 2021 · 7 comments
Closed

Support for .net 5 #1369

pankti11 opened this issue Jan 11, 2021 · 7 comments
Labels
🐛 Bug Something isn't working

Comments

@pankti11
Copy link

pankti11 commented Jan 11, 2021

Describe 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.b__11_0(String x)
at System.Linq.Enumerable.All[TSource](IEnumerable1 source, Func2 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

@pankti11 pankti11 added the 🐛 Bug Something isn't working label Jan 11, 2021
@rouke-broersma
Copy link
Member

Thanks for letting us know!

@daveaglick
Copy link

This should now be fixed upstream in Buildalyzer, a new version will roll out momentarily (but will still need to be updated in Stryker).

@rouke-broersma
Copy link
Member

Awesome @daveaglick 👏

@rouke-broersma
Copy link
Member

@pankti11 The package has been updated, the next stryker release should resolve your issue.

@pankti11
Copy link
Author

Thanks for the quick update.

@rouke-broersma
Copy link
Member

rouke-broersma commented Jan 13, 2021

Thank @daveaglick and @slang25 ;)

@rouke-broersma
Copy link
Member

@pankti11 the fix has just been released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants