Repository navigation
test(stryker): move stryker-config.json into the test project - #378
Merged
Merged
Conversation
Run from the repository root, Stryker finds TryPattern.sln, switches to solution mode and analyses every project, including examples/VB.*.vbproj. Its Buildalyzer ships an older Microsoft.CodeAnalysis.VisualBasic than the .NET 10 SDK's Roslyn, so the VB parser's static ctor throws TypeLoadException: Roslyn.Utilities.IObjectWritable (stryker-mutator/stryker-net#3666). The crash was never about the analyzers' Roslyn version. stryker.yaml already runs `(cd <dir> && dotnet stryker)` for any tests/**/stryker-config.json, so moving the config there keeps Stryker out of solution mode. Verified locally with dotnet-stryker 5.0.0: 147 mutants, score 92.66% (break: 60). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 26, 2026
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes the Stryker crash tracked in #281. The earlier diagnosis on that issue (analyzer or test-project Roslyn versions) was wrong. The real cause:
stryker-config.jsonsat at the repo root, and the workflow randotnet stryker --config-file stryker-config.jsonfrom there.TryPattern.slnin the working directory, Stryker switches to solution mode and analyses every project, includingexamples/VB.DotNet462.Example.vbprojandexamples/VB.DotNet8.Example.vbproj.Microsoft.CodeAnalysis.VisualBasicthan the .NET 10 SDK's Roslyn, so the VB command-line parser throwsTypeLoadException: Roslyn.Utilities.IObjectWritable. This matches upstream TypeLoadException: IObjectWritable from VisualBasicCommandLineParser when solution contains a VB project (.NET 10 SDK) stryker-mutator/stryker-net#3666.stryker.yamlalready runs(cd "$dir" && dotnet stryker)for anytests/**/stryker-config.json. Moving the config intotests/Wolfgang.TryPattern.Tests.Unit/keeps Stryker out of solution mode, with no workflow change needed. The config now names the project under test (Wolfgang.TryPattern.csproj); the test project is the working directory. Thresholds are unchanged.docs/MUTATION-TESTING.mdhas the new local-run command and the corrected crash explanation.Verification
I ran plain
dotnet stryker(5.0.0) fromtests/Wolfgang.TryPattern.Tests.Unit, which is exactly what the workflow runs:break: 60IObjectWritablecrash.The workflow still pins 4.16.0, and I haven't run 4.16.0 locally. The follow-up protected PR pins 5.0.0 (the version verified here) and re-enables the
pull_requesttrigger from #281's acceptance criteria.Refs #281
🤖 Generated with Claude Code