Skip to content

Migrate WinMDExp to multithreaded execution #13635

@jankratochvilcz

Description

@jankratochvilcz

Background

WinMDExp wraps the Windows Runtime metadata exporter winmdexp.exe to produce .winmd files from a managed assembly. As a ToolTask, its process launch and timestamp probes must move to TaskEnvironment.

Migration scope

  • Apply [MSBuildMultiThreadableTask]
  • Implement IMultiThreadableTask
  • Absolutize paths via TaskEnvironment.GetAbsolutePath() for: WinMDModule, References items, OutputWindowsMetadataFile, OutputDocumentationFile, InputDocumentationFile, InputPDBFile, OutputPDBFile, SdkToolsPath, ToolPath
  • Use TaskEnvironment.GetEnvironmentVariable() for: any SDK lookup fallbacks (review GenerateFullPathToTool)
  • Use TaskEnvironment.GetProcessStartInfo() for: winmdexp.exe invocation

Known complexity factors

  • ToolTask base — process invocation routes through TaskEnvironment.GetProcessStartInfo()
  • Up-to-date check uses NativeMethodsShared.GetLastWriteFileUtcTime on multiple paths — must be absolute
  • Sets [Output] OutputWindowsMetadataFile derived from input — preserve original spec (Sin 1)
  • Windows-only feature

Exit criteria

  • Build clean, no new warnings
  • Existing tests pass
  • No regression in error message paths (Sin 2 audit)
  • No leakage of absolutized paths into [Output] properties (Sin 1 audit)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions