Enlighten more tasks that require no change#13045
Merged
baronfel merged 1 commit intodotnet:mainfrom Jan 16, 2026
Merged
Conversation
baronfel
approved these changes
Jan 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR marks six simple MSBuild tasks as multithreadable to improve performance in multi-threaded builds. The tasks are safe for concurrent execution because they only perform read operations on input data (metadata reading, string/XML manipulation, logging) without modifying global process state or depending on relative path resolution.
Changes:
- Added
[MSBuildMultiThreadableTask]attribute to six task classes - Tasks will now execute in-process within thread nodes instead of sidecar TaskHost processes in multithreaded mode
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Tasks/GetCompatiblePlatform.cs | Added multithreadable attribute - task only reads metadata and calls shared utility |
| src/Tasks/FindInvalidProjectReferences.cs | Added multithreadable attribute - task only reads metadata and logs warnings |
| src/Tasks/FindAppConfigFile.cs | Added multithreadable attribute - task only performs string manipulation and metadata operations |
| src/Tasks/ErrorFromResources.cs | Added multithreadable attribute - task only logs error messages |
| src/Tasks/CombineXmlElements.cs | Added multithreadable attribute - task performs pure XML manipulation |
| src/Tasks/CombineTargetFrameworkInfoProperties.cs | Added multithreadable attribute - task performs pure XML manipulation |
This was referenced Jan 20, 2026
This was referenced Mar 11, 2026
Closed
This was referenced Mar 13, 2026
Open
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.
Context
This PR marks several simple tasks as multithreadable.
Changes Made
Marks several simple tasks as multithreadable by adding the MSBuildMultiThreadableTask attribute.
These tasks are safe for concurrent execution because they:
CombineTargetFrameworkInfoProperties, CombineXmlElements - Pure XML/string manipulation
ErrorFromResources - only logs messages
FindAppConfigFile, FindInvalidProjectReferences, GetCompatiblePlatform - Only reads metadata from ITaskItem objects; no file I/O
Testing
manual