Migrate ShowPreviewMessage to IMultiThreadableTask#53956
Open
SimaTian wants to merge 5 commits intodotnet:mainfrom
Open
Migrate ShowPreviewMessage to IMultiThreadableTask#53956SimaTian wants to merge 5 commits intodotnet:mainfrom
SimaTian wants to merge 5 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates ShowPreviewMessage to participate in MSBuild’s multithreaded task execution model by marking it as multithreadable and implementing IMultiThreadableTask, with accompanying unit tests validating expected behavior.
Changes:
- Adds
[MSBuildMultiThreadableTask]and implementsIMultiThreadableTaskonShowPreviewMessage, including aTaskEnvironmentproperty. - Introduces new unit tests covering interface implementation, guard/registration behavior, logging behavior, and per-engine isolation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Tasks/Microsoft.NET.Build.Tasks/ShowPreviewMessage.cs |
Marks the task as multithreadable and adds the IMultiThreadableTask TaskEnvironment property (with NETFRAMEWORK handling). |
src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAShowPreviewMessageMultiThreading.cs |
Adds unit tests validating multithreadable task requirements and expected logging/guard behavior. |
This was referenced Apr 17, 2026
- Add [MSBuildMultiThreadableTask] attribute to support multi-threaded execution - Implement IMultiThreadableTask interface with TaskEnvironment property - Conditional implementation for NETFRAMEWORK vs other targets - Add comprehensive unit tests for multi-threading scenarios Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
a180d93 to
5be750f
Compare
OvesN
approved these changes
May 5, 2026
AR-May
approved these changes
May 5, 2026
AR-May
reviewed
May 5, 2026
AR-May
approved these changes
May 5, 2026
Delegates the SDK's TaskEnvironmentDefaults and TaskEnvironmentHelper shims to MSBuild's public TaskEnvironment.Fallback / CreateWithProjectDirectoryAndEnvironment APIs (dotnet/msbuild#13462), and drops the now-unused ProcessTaskEnvironmentDriver polyfill. Pipelines are expected to fail until the consumed MSBuild API target version is bumped to a build that exposes these APIs. 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.
Migrates \ShowPreviewMessage\ to support \IMultiThreadableTask.
Changes
Supersedes
Part of the split of stuck merge-group PR #52936. This is the 5-of-5 split for \ShowPreviewMessage.