You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When added warnings as errors in my csproj:
PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"
WarningsAsErrors $(WarningsAsErrors);NU1605;nullable WarningsAsErrors
PropertyGroup
And running the stryker it's throws an System.AggregateException
Logs
[2024-11-03T18:18:31.642Z] System.AggregateException: One or more errors occurred. (An item with the same key has already been added. Key: NU1605) (An item with the same key has already been added. Key: NU1605) (An item with the same key has already been added. Key: NU1605) (An item with the same key has already been added. Key: NU1605)
[2024-11-03T18:18:31.642Z] ---> System.ArgumentException: An item with the same key has already been added. Key: NU1605
[2024-11-03T18:18:31.642Z] at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
[2024-11-03T18:18:31.642Z] at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
[2024-11-03T18:18:31.642Z] at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)
[2024-11-03T18:18:31.642Z] at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func`2 elementSelector)
[2024-11-03T18:18:31.642Z] at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultExtensions.GetDiagnosticOptions(IAnalyzerResult analyzerResult)
[2024-11-03T18:18:31.642Z] at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultCSharpExtensions.GetCompilationOptions(IAnalyzerResult analyzerResult)
[2024-11-03T18:18:31.642Z] at Stryker.Core.Compiling.CsharpCompilingProcess.GetCSharpCompilation(IEnumerable`1 syntaxTrees)
[2024-11-03T18:18:31.642Z] at Stryker.Core.Compiling.CsharpCompilingProcess.GetSemanticModels(IEnumerable`1 syntaxTrees)
[2024-11-03T18:18:31.642Z] at Stryker.Core.MutationTest.CsharpMutationProcess.Mutate(MutationTestInput input)
[2024-11-03T18:18:31.642Z] at Stryker.Core.MutationTest.MutationTestProcess.Mutate()
[2024-11-03T18:18:31.642Z] at Stryker.Core.Initialisation.ProjectMutator.MutateProject(StrykerOptions options, MutationTestInput input, IReporter reporters)
[2024-11-03T18:18:31.642Z] at Stryker.Core.Initialisation.ProjectOrchestrator.<>c__DisplayClass7_0.b__0(MutationTestInput mutationTestInput)
[2024-11-03T18:18:31.642Z] at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
Expected behavior
Just to work as usual
Desktop (please complete the following information):
OS: Unix
Type of project .NET Core 8
Framework Version .NET Core 8
Stryker Version 4.2.0
The text was updated successfully, but these errors were encountered:
Daniel-Markov
changed the title
Adding same code to dictionary from analyzers cause exception.
Adding same analyzer code to dictionary from analyzers cause exception.
Nov 4, 2024
Daniel-Markov
changed the title
Adding same analyzer code to dictionary from analyzers cause exception.
Adding same analyzer code to dictionary cause exception.
Nov 4, 2024
Describe the bug
When added warnings as errors in my csproj:
PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"
WarningsAsErrors $(WarningsAsErrors);NU1605;nullable WarningsAsErrors
PropertyGroup
PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"
WarningsAsErrors$(WarningsAsErrors);NU1605;nullable WarningsAsErrors
PropertyGroup
And running the stryker it's throws an System.AggregateException
Logs
[2024-11-03T18:18:31.642Z] System.AggregateException: One or more errors occurred. (An item with the same key has already been added. Key: NU1605) (An item with the same key has already been added. Key: NU1605) (An item with the same key has already been added. Key: NU1605) (An item with the same key has already been added. Key: NU1605)
[2024-11-03T18:18:31.642Z] ---> System.ArgumentException: An item with the same key has already been added. Key: NU1605
[2024-11-03T18:18:31.642Z] at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
[2024-11-03T18:18:31.642Z] at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
[2024-11-03T18:18:31.642Z] at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)[2024-11-03T18:18:31.642Z] at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func
2 keySelector, Func`2 elementSelector)[2024-11-03T18:18:31.642Z] at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultExtensions.GetDiagnosticOptions(IAnalyzerResult analyzerResult)
[2024-11-03T18:18:31.642Z] at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultCSharpExtensions.GetCompilationOptions(IAnalyzerResult analyzerResult)
[2024-11-03T18:18:31.642Z] at Stryker.Core.Compiling.CsharpCompilingProcess.GetCSharpCompilation(IEnumerable`1 syntaxTrees)
[2024-11-03T18:18:31.642Z] at Stryker.Core.Compiling.CsharpCompilingProcess.GetSemanticModels(IEnumerable`1 syntaxTrees)
[2024-11-03T18:18:31.642Z] at Stryker.Core.MutationTest.CsharpMutationProcess.Mutate(MutationTestInput input)
[2024-11-03T18:18:31.642Z] at Stryker.Core.MutationTest.MutationTestProcess.Mutate()
[2024-11-03T18:18:31.642Z] at Stryker.Core.Initialisation.ProjectMutator.MutateProject(StrykerOptions options, MutationTestInput input, IReporter reporters)
[2024-11-03T18:18:31.642Z] at Stryker.Core.Initialisation.ProjectOrchestrator.<>c__DisplayClass7_0.b__0(MutationTestInput mutationTestInput)
[2024-11-03T18:18:31.642Z] at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
Expected behavior
Just to work as usual
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: