Migrate CopyRefAssembly to multithreaded execution model#84420
Draft
OvesN wants to merge 4 commits into
Draft
Conversation
Moves all three Microsoft.Build central groups (source-build, net10.0, net472) to 18.6.3. Unlike 18.4.0, 18.6.3's dependency closure requires System.* at 10.0.3+, so align the transitively-pulled System.* packages to the 10.0.8 band already used by the core flowed System.* packages (System.Collections.Immutable, System.Text.Json, etc.): - Hand-maintained literals: System.CodeDom (Packages.props), System.Security.Cryptography.Pkcs/Xml (Versions.props, both groups). - darc-flowed peripherals (only pulled transitively via MSBuild, so they lagged at 10.0.1): System.Configuration.ConfigurationManager, System.Diagnostics.EventLog, System.Security.Cryptography.ProtectedData, System.Resources.Extensions (Version.Details.xml + Version.Details.props). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…for 18.6.3 Annotate the task with [MSBuildMultiThreadableTask] so it can run in-process under MSBuild's multithreaded execution model. Its Execute() only logs a message, so the attribute alone is sufficient; it does not need IMultiThreadableTask or TaskEnvironment. All build flavors reference 18.6.3, so the attribute is applied unconditionally. Also update ErrorLoggingEngine: the internal Microsoft.Build.Shared.EventArgsFormatting helper it reflects into moved from Microsoft.Build.dll to Microsoft.Build.Framework.dll in MSBuild 18.6+, so load it from Microsoft.Build.Framework.dll. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Implement IMultiThreadableTask and resolve SourcePath/DestinationPath against the task's ProjectDirectory (via TaskEnvironment) instead of the process-wide current directory, so the task is safe to run concurrently in MSBuild's multithreaded mode. Log output keeps the original relative paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
OvesN
force-pushed
the
dev/veronikao/migrate-CopyRefAssembly-to-mt
branch
from
July 7, 2026 08:01
88b9ea3 to
06db787
Compare
JanProvaznik
approved these changes
Jul 15, 2026
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 dotnet/msbuild#14258
Migrates the
CopyRefAssemblytask to MSBuild's multithreaded execution model.What: Implements
IMultiThreadableTaskand marks the task[MSBuildMultiThreadableTask].SourcePath/DestinationPathare absolutized against the task'sProjectDirectory(viaTaskEnvironment) instead of the process-wide current working directory.Why: In multithreaded MSBuild mode, tasks share a single process, so depending on the process current directory is unsafe. Resolving paths against
ProjectDirectorykeeps the task correct when instances run concurrently. Log output still shows the original relative paths, and null/empty inputs keep their existing "file missing"/error behavior (the migration guardsGetAbsolutePathwithstring.IsNullOrEmpty).Note
The Microsoft.Build 18.6.3 version bump included in this branch comes from #84343. This PR is stacked on that change and should be merged after it.
Microsoft Reviewers: Open in CodeFlow