Skip to content

Migrate TlbImp to multithreaded execution (MSBuild) #13633

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions