Skip to content

Conversation

@dupdob
Copy link
Member

@dupdob dupdob commented Nov 5, 2025

Reach 'full' support of solutions:

  1. Add support for snlx files (on top of sln files)
  2. Add support for solution level configurations
  3. Add support for specifying platform.

Support of solution level configurations offers permits to define a Stryker specific configuration(s) to exclude some project for example.
Platform can be specified via the `|'.

May fix #3269

dupdob added 6 commits August 20, 2025 22:43
# Conflicts:
#	src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs
#	src/Stryker.Solutions.Test/SolutionFileShould.cs
Copilot AI review requested due to automatic review settings November 5, 2025 16:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for solution file parsing and platform configuration in Stryker.NET. The changes introduce a new Stryker.Solutions library that leverages Microsoft.VisualStudio.SolutionPersistence to parse solution files and extract project configurations.

Key changes:

  • New Stryker.Solutions library with SolutionFile class for parsing Visual Studio solution files
  • Support for specifying platform (e.g., "Any CPU") alongside configuration when building projects
  • Refactored InputFileResolver to use solution file parsing when analyzing solution contexts
  • Updated StrykerOptions to support platform configuration through the Configuration property
  • Multiple code quality improvements including null safety, simplified LINQ expressions, and better error handling

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 31 comments.

Show a summary per file
File Description
src/Stryker.sln Added two new projects: Stryker.Solutions and Stryker.Solutions.Test
src/Stryker.Solutions/SolutionFile.cs New class for parsing and querying Visual Studio solution files
src/Stryker.Solutions/Stryker.Solutions.csproj New project file for the Solutions library
src/Stryker.Solutions.Test/* New test project with comprehensive tests for SolutionFile functionality
src/Stryker.Utilities/Buildalyzer/IAnalyzerResultExtensions.cs Refactored with improved null annotations, simplified LINQ, and moved helper class to bottom
src/Stryker.Utilities/Buildalyzer/Buildalyzer.cs Removed unused overload taking solution file path
src/Stryker.Options/Options/StrykerOptions.cs Added Platform property and logic to parse it from Configuration string
src/Stryker.Options/Options/Inputs/ConfigurationInput.cs Updated description and removed whitespace validation
src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs Major refactoring to use SolutionFile for solution context analysis
src/Stryker.Core/Stryker.Core/Initialisation/InitialBuildProcess.cs Added platform parameter support
src/Stryker.Core/Stryker.Core/Helpers/MsBuildHelper.cs Added platform parameter to build commands
src/Stryker.Core/Stryker.Core.UnitTest/* Updated tests to accommodate new parameters and solution provider
src/Directory.Packages.props Added Microsoft.VisualStudio.SolutionPersistence package

Copilot AI review requested due to automatic review settings November 5, 2025 17:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 7 comments.

Copilot AI review requested due to automatic review settings November 7, 2025 07:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 14 comments.

Copilot AI review requested due to automatic review settings November 7, 2025 17:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs:1

  • This test verifies that an InvalidOperationException is thrown when the solution is not found, but the implementation at line 62 in SolutionFile.cs throws InvalidOperationException, while the error handling in InputFileResolver.cs (lines 77-91) catches IOException, UnauthorizedAccessException, and AggregateException. The test should verify the logged error and empty return, not an exception being thrown.
using System;

@dupdob dupdob force-pushed the new_solution_support branch from 618520e to d20788a Compare November 7, 2025 18:11
Copilot AI review requested due to automatic review settings November 7, 2025 22:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 11 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 8, 2025 07:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 7 comments.

@rouke-broersma
Copy link
Member

@dupdob it will be at least two weeks before I am able to review, sorry

Copilot AI review requested due to automatic review settings November 12, 2025 07:38
Copilot finished reviewing on behalf of dupdob November 12, 2025 07:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated 9 comments.

# Conflicts:
#	src/Directory.Packages.props
#	src/Stryker.CLI/Stryker.CLI.UnitTest/packages.lock.json
#	src/Stryker.CLI/Stryker.CLI/packages.lock.json
#	src/Stryker.Core/Stryker.Core.UnitTest/packages.lock.json
#	src/Stryker.TestRunner.VsTest.UnitTest/packages.lock.json
Copilot AI review requested due to automatic review settings November 13, 2025 07:55
Copilot finished reviewing on behalf of dupdob November 13, 2025 07:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 42 out of 42 changed files in this pull request and generated no new comments.

@sonarqubecloud
Copy link

@dupdob dupdob added the Area: Initialization projects identification and analysis label Nov 17, 2025
@dupdob dupdob added the Priority: High Pressing issue. Should be resolved as quick as possible. label Nov 18, 2025
@dupdob dupdob mentioned this pull request Nov 18, 2025
@jacekmlynek
Copy link

Any chance to approve this and release soon?

@jacekmlynek

This comment has been minimized.

@rouke-broersma
Copy link
Member

Anyone waiting on this can expedite the process by helping review and test the PR 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Initialization projects identification and analysis Priority: High Pressing issue. Should be resolved as quick as possible.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stryker.NET throws error when project configuration manager excludes projects from build

4 participants