Add --artifacts-path support to dotnet test in MTP mode#53353
Merged
Youssef1313 merged 2 commits intorelease/10.0.3xxfrom Mar 11, 2026
Merged
Add --artifacts-path support to dotnet test in MTP mode#53353Youssef1313 merged 2 commits intorelease/10.0.3xxfrom
--artifacts-path support to dotnet test in MTP mode#53353Youssef1313 merged 2 commits intorelease/10.0.3xxfrom
Conversation
Copilot
AI
changed the title
[WIP] Fix dotnet test to support --artifacts-path option
Add Mar 10, 2026
--artifacts-path support to dotnet test in MTP mode
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
7cc339e to
db4922c
Compare
Youssef1313
approved these changes
Mar 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds missing --artifacts-path support to dotnet test when running in Microsoft Testing Platform (MTP) mode, aligning it with VSTest mode and other MSBuild-integrated dotnet commands.
Changes:
- Added
ArtifactsPathOptionto the MTPdotnet testcommand definition viaCommonOptions.CreateArtifactsPathOption()(MSBuild-forwarded asArtifactsPathwith absolute path normalization). - Updated the MTP help output snapshot to include the new
--artifacts-path <ARTIFACTS_DIR>option.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Cli/Microsoft.DotNet.Cli.Definitions/Commands/Test/TestCommandDefinition.MicrosoftTestingPlatform.cs | Registers the standard --artifacts-path option in MTP mode so it forwards into MSBuild like other commands. |
| test/dotnet.Tests/CommandTests/Test/snapshots/MTPHelpSnapshotTests.VerifyMTPHelpOutput.verified.txt | Updates the verified help snapshot to reflect the newly available option. |
nohwnd
approved these changes
Mar 11, 2026
This was referenced Mar 12, 2026
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.
dotnet testin Microsoft Testing Platform (MTP) mode was missing the--artifacts-pathoption that VSTest mode and all other MSBuild-integrated commands (build,restore,publish, etc.) support.Changes
TestCommandDefinition.MicrosoftTestingPlatform.cs: AddedArtifactsPathOptionviaCommonOptions.CreateArtifactsPathOption()— the same factory used by VSTest and build commands. The option usesForwardAsSingle()to automatically translate--artifacts-path <path>→--property:ArtifactsPath=<absolute-path>forwarded to MSBuild through the existingOptionValuesToBeForwarded()path inMSBuildUtility.GetBuildOptions(). No additional parsing logic needed.MTPHelpSnapshotTests.VerifyMTPHelpOutput.verified.txt: Updated help output snapshot to include--artifacts-path <ARTIFACTS_DIR>and corrected line-wrapping to match current terminal width.Usage
Original prompt
dotnet testmtp lost--artifacts-path#53204✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.