Repository navigation
mark Tasks requiring no change as multithreadable - #12840
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR marks 15 MSBuild tasks as multithreadable by adding the [MSBuildMultiThreadableTask] attribute. These tasks don't rely on process state like the current working directory, environment variables, or other global state, making them safe to execute in parallel within MSBuild's multithreaded execution model.
Key Changes
- Added
[MSBuildMultiThreadableTask]attribute to 15 simple task classes that only manipulate inputs/metadata - Added
using Microsoft.Build.Framework;directive to Error.cs and Warning.cs where needed - Tasks marked include: Warning, Error, Message, MSBuildInternalMessage, Telemetry, RemoveDuplicates, Hash, FindInList, FormatVersion, CreateProperty, ConvertToAbsolutePath, CombinePath, AssignLinkMetadata, AssignCulture, and SetRidAgnosticValueForProjects
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Tasks/Warning.cs | Added multithreadable attribute and required using directive for simple warning task |
| src/Tasks/Telemetry.cs | Added multithreadable attribute for telemetry logging task |
| src/Tasks/SetRidAgnosticValueForProjects.cs | Added multithreadable attribute for metadata manipulation task |
| src/Tasks/Message.cs | Added multithreadable attribute for simple message logging task |
| src/Tasks/MSBuildInternalMessage.cs | Added multithreadable attribute for internal message task |
| src/Tasks/ListOperators/RemoveDuplicates.cs | Added multithreadable attribute for list deduplication task |
| src/Tasks/Hash.cs | Added multithreadable attribute for hash generation task |
| src/Tasks/FormatVersion.cs | Added multithreadable attribute for version formatting task |
| src/Tasks/FindInList.cs | Added multithreadable attribute for list search task |
| src/Tasks/Error.cs | Added multithreadable attribute and required using directive for simple error task |
| src/Tasks/CreateProperty.cs | Added multithreadable attribute for property passthrough task |
| src/Tasks/ConvertToAbsolutePath.cs | Added multithreadable attribute for path conversion task using FullPath metadata |
| src/Tasks/CombinePath.cs | Added multithreadable attribute for path combination task |
| src/Tasks/AssignLinkMetadata.cs | Added multithreadable attribute for link metadata assignment task |
| src/Tasks/AssignCulture.cs | Added multithreadable attribute for culture assignment task |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Member
Author
|
oops I didn't add it fixes #12485 |
This was referenced Dec 2, 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.
Fixes #
Context
These tasks don't rely on process state (CWD etc.)
Changes Made
Add attribute marking them as multithreadable
Testing
Notes