Repository navigation
Fix HangDump artifact paths for Windows directories with spaces - #8513
Merged
Amaury Levé (Evangelink) merged 7 commits intoMay 25, 2026
Merged
Conversation
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix HangDump artifact paths on Windows
Fix HangDump artifact paths for Windows directories with spaces
May 22, 2026
The 1-arg overload is only called inside the #if NETCOREAPP branch, so on netstandard2.0 it triggered IDE0051 (unused private member) and failed the Release build. Wrap the helper in the same #if block to match the call site. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes HangDump dump-file path handling on Windows when the results directory contains spaces by separating the “quoted for DiagnosticsClient.WriteDump” path from the unquoted path used for artifact tracking/publication.
Changes:
- Introduced a
DumpFileNameshelper to produce a quoted dump path only for theWriteDumpcall, while preserving an unquoted path for_dumpFilesand artifact publication. - Added a unit test verifying the quoting behavior for a Windows-style path containing spaces.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTests/Microsoft.Testing.Extensions.UnitTests/HangDumpTests.cs | Adds regression test asserting only the WriteDump argument is quoted while the artifact path remains unquoted. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/HangDumpProcessLifetimeHandler.cs | Refactors dump path handling to avoid publishing artifact paths containing literal quotes on Windows. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
Amaury Levé (Evangelink)
marked this pull request as ready for review
May 23, 2026 15:44
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
HangDump quoted dump paths before calling
DiagnosticsClient.WriteDumpon Windows, then reused that quoted string for artifact publication. This producedFileArtifactpaths containing literal quotes, which do not point to the dump file on disk.WriteDumpworkaround_dumpFilesand artifact publicationWriteDumpargument is quoted and the artifact path remains unquoted.