Repository navigation
Mark VSTestLogsTask as MSBuild-multithreadable - #16790
Merged
Azat Mukhametshin (azat-msft) merged 1 commit intoDec 3, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
cc AR-May for review |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the change enabling in-process VSTest logging during multithreaded builds.
No open issues 🎉
What changed in this PR
This PR opts VSTest’s MSBuild logging task into in-process execution during multithreaded builds (dotnet build -mt), while retaining the existing MSBuild dependency.
Changes:
- Marks
VSTestLogsTaskwith[MSBuildMultiThreadableTask]. - Adds an internal attribute polyfill so newer MSBuild hosts can recognize the marker without requiring a dependency upgrade.
| File | Description |
|---|---|
src/Microsoft.TestPlatform.Build/Tasks/VSTestLogsTask.cs |
Adds the multithreadable-task marker. |
src/Microsoft.TestPlatform.Build/MSBuildMultiThreadableTaskAttribute.cs |
Defines the internal compatibility attribute with class-only, non-inherited usage. |
Review effort: Balanced
This was referenced Nov 26, 2026
Member
|
/azp run |
1 similar comment
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Member
|
/azp run |
Azat Mukhametshin (azat-msft)
approved these changes
Dec 3, 2026
Azat Mukhametshin (azat-msft)
merged commit Dec 3, 2026
4269883
into
microsoft:main
26 checks passed
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.
Marks VSTestLogsTask with [MSBuildMultiThreadableTask] (using an internal Microsoft.Build.Framework.MSBuildMultiThreadableTaskAttribute polyfill for MBF 17.11.48) so it runs in-process under MSBuild -mt instead of routing to an out-of-proc TaskHost on every dotnet test.
The task only logs localized messages based on LogType and accesses no files, CWD, environment variables, or mutable static state. See Update a task for multithreaded mode.
Relates to dotnet/msbuild#15698. cc AR-May