Skip to content

WinMDExp Migration#13682

Open
AlesProkop wants to merge 3 commits intodotnet:mainfrom
AlesProkop:winmdexp-mt-migration
Open

WinMDExp Migration#13682
AlesProkop wants to merge 3 commits intodotnet:mainfrom
AlesProkop:winmdexp-mt-migration

Conversation

@AlesProkop
Copy link
Copy Markdown
Member

@AlesProkop AlesProkop commented May 5, 2026

Fixes #13635

Context

Migrates WinMDExp to the multithreaded task model so its path handling, environment access, and winmdexp.exe process
launch go through TaskEnvironment.

Changes Made

  • Added multithreaded task support with [MSBuildMultiThreadableTask] and IMultiThreadableTask.
  • Absolutized task input/tool paths through TaskEnvironment.GetAbsolutePath() before filesystem probes and tool
    execution.
  • Routed SDK lookup environment access through TaskEnvironment.GetEnvironmentVariable().
  • Routed winmdexp.exe process creation through TaskEnvironment.GetProcessStartInfo().
  • Preserved output property values so absolutized internal paths do not leak into task outputs.

Testing

  • Built successfully with no new warnings.
  • Ran existing relevant tests.
  • Audited output/error path behavior for Sin 1 and Sin 2 concerns.

@AlesProkop AlesProkop marked this pull request as ready for review May 5, 2026 14:35
Copilot AI review requested due to automatic review settings May 5, 2026 14:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This draft PR starts migrating the built-in WinMDExp task toward MSBuild’s multithreaded execution model. In the codebase, WinMDExp is a Windows-only ToolTask wrapper around winmdexp.exe, so the intended fit is to move path/process interactions onto TaskEnvironment-safe patterns.

Changes:

  • Marks the .NET Framework WinMDExp task with [MSBuildMultiThreadableTask].
  • Updates GenerateFullPathToTool() to use a TaskEnvironment-aware existence probe during SDK tool discovery.
  • Updates SkipTaskExecution() to absolutize the input/output paths used for timestamp comparison.

Comment thread src/Tasks/WinMDExp.cs
Comment thread src/Tasks/WinMDExp.cs
Comment thread src/Tasks/WinMDExp.cs
@AlesProkop AlesProkop changed the title WinMDExp migration [Draft] WinMDExp Migration May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate WinMDExp to multithreaded execution

2 participants