Skip to content

Migrate TlbImp to multithreaded execution #13633

@jankratochvilcz

Description

@jankratochvilcz

Background

TlbImp (internal nested ToolTask used by ResolveComReference) wraps TlbImp.exe to import a COM type library into a managed interop assembly. As a ToolTask, its process invocation depends on global process state.

Migration scope

  • Apply [MSBuildMultiThreadableTask] to TlbImp (audit shared AxTlbBaseTask base)
  • Implement IMultiThreadableTask
  • Absolutize paths via TaskEnvironment.GetAbsolutePath() for: TypeLibName, AssemblyFile/OutputAssembly, KeyFile, KeyContainer-derived paths, ReferenceFiles, ToolPath
  • Use TaskEnvironment.GetEnvironmentVariable() for: env vars consumed by ToolTask base (review)
  • Use TaskEnvironment.GetProcessStartInfo() for: TlbImp.exe invocation

Known complexity factors

  • Shares AxTlbBaseTask : ToolTaskExtension with AxImp — coordinate base-class refactor
  • ToolTask process launch must route through TaskEnvironment.GetProcessStartInfo()
  • Driven by ResolveComReference; that call site must propagate TaskEnvironment
  • Windows-only / NETFRAMEWORK-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