Support .slnf file format in dotnet test#46392
Merged
mariam-abdulla merged 23 commits intomainfrom Jan 31, 2025
Merged
Conversation
mariam-abdulla
commented
Jan 29, 2025
…nly have 1 slnf file, then this will work
edvilme
reviewed
Jan 29, 2025
Contributor
edvilme
left a comment
There was a problem hiding this comment.
Excited to see this getting support! :)
This was referenced Jan 29, 2025
Open
kasperk81
reviewed
Jan 29, 2025
Co-authored-by: Eduardo Villalpando Mello <eduardov@microsoft.com>
…ithub.com/dotnet/sdk into dev/mabdullah/support-slnf-in-dotnet-test
Evangelink
reviewed
Jan 30, 2025
src/Cli/dotnet/commands/dotnet-test/SolutionAndProjectUtility.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-test/SolutionAndProjectUtility.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-test/TestApplicationEventHandlers.cs
Outdated
Show resolved
Hide resolved
…rs.cs Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
…ithub.com/dotnet/sdk into dev/mabdullah/support-slnf-in-dotnet-test
edvilme
reviewed
Jan 30, 2025
…ithub.com/dotnet/sdk into dev/mabdullah/support-slnf-in-dotnet-test
fhnaseer
reviewed
Jan 31, 2025
fhnaseer
approved these changes
Jan 31, 2025
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.
This pull request focuses on refactoring and improving the handling of solution and project files in the CLI, as well as enhancing the build process. The most important changes include the introduction of new methods for parsing solution filter files, simplifying the
MSBuildHandlerclass, and updating constants to support solution filter files.Refactoring and Enhancements:
src/Cli/dotnet/SlnFileFactory.cs: Introduced new methodsGetSolutionPathFromFilteredSolutionFileandParseSolutionFilterFileto handle solution filter files, and refactoredCreateFromFilteredSolutionFileto use these methods. [1] [2] [3] [4]Simplification of
MSBuildHandler:src/Cli/dotnet/commands/dotnet-test/MSBuildHandler.cs: Removed redundant methods and simplified the build process by delegating solution and project handling toMSBuildUtility. Also, removed the degree of parallelism parameter and the validation of build path options. [1] [2] [3] [4] [5]Support for Solution Filter Files:
src/Cli/dotnet/commands/dotnet-test/CliConstants.cs: Added support for.slnffiles by updating theSolutionExtensionsarray and introducingSolutionFilterExtensionPattern.dotnet test --solution "TestProjects.slnf".dotnet testand there exists only one.slnffile in the directory, we will run projects inside this .slnf file. But if we have multiple.slnffiles, we will throw an error to specify the solution file. If we have 1 solution file (.sln/.slnx) and multiple .slnf files, we run only the solution file.Relates to #45927