Skip to content

mark Tasks requiring no change as multithreadable - #12840

Merged
JanProvaznik merged 1 commit into
dotnet:mainfrom
JanProvaznik:no-change-tasks
Dec 1, 2025
Merged

JanProvaznik merged 1 commit into
dotnet:mainfrom
JanProvaznik:no-change-tasks

Conversation

@JanProvaznik

Copy link
Copy Markdown
Member

Fixes #

Context

These tasks don't rely on process state (CWD etc.)

Changes Made

Add attribute marking them as multithreadable

Testing

Notes

Copilot AI review requested due to automatic review settings November 27, 2025 12:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JanProvaznik JanProvaznik self-assigned this Nov 27, 2025
@JanProvaznik
JanProvaznik requested a review from AR-May November 27, 2025 13:42

@AR-May AR-May left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JanProvaznik
JanProvaznik merged commit 74e1324 into dotnet:main Dec 1, 2025
@JanProvaznik

Copy link
Copy Markdown
Member Author

oops I didn't add it fixes #12485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants