Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 10, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…ks (CLR35 and CLR2) (#12823)

### Context

The recent change #12642 helped to
uncover a long-term bug when a custom task was eventually executed
out-of-proc, but due to lack of architecture/runtime match check BEFORE
the TypeLoad, it was lazily loaded in-proc and pushed out-of-proc later.

https://github.com/dotnet/msbuild/blob/ee6457a6b06e66a5e4037549c84d8282ecd0df92/src/Build/Instance/TaskFactories/AssemblyTaskFactory.cs#L335
look at  `!TaskHostParametersMatchCurrentProcess`

### Changes Made
- Fixed assembly enumeration: Previously only `.dll` files were added to
MetadataLoadContext's resolver. Now `.exe` files are also included,
since executables can be valid managed assemblies and dependencies.

- Added legacy .NET Framework support (.NET Framework only): Added
assembly discovery for v2.0 and v3.5 framework directories to support
tasks that depend on legacy Microsoft.Build.Utilities.dll (as opposed to
the modern Microsoft.Build.Utilities.Core.dll).

### Test 
Locally tested with custom tasks using both modern and legacy MSBuild
assemblies + current tests confirm there are no regression.

---------

Co-authored-by: Copilot <[email protected]>
@pull pull bot locked and limited conversation to collaborators Dec 10, 2025
@pull pull bot added the ⤵️ pull label Dec 10, 2025
@pull pull bot merged commit 2960e90 into thompson-tomo:main Dec 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant