TLBIMP 有哪些运行时依赖项?

What runtime dependencies does TLBIMP have?

设置一个干净的构建机器到目前为止我只安装了 VS2019,包括 Windows 10 SDK,就第 3 方软件而言。

ODL 文件有自定义编译步骤:

midl /out ..\dll %(FullPath)
TLBIMP ../dll/%(Filename).tlb /namespace:MyOrg.COM /keyfile:../include/MyOrg.snk /out:../dll/%(Filename).dll

这给出了构建错误:

1>'TLBIMP' is not recognized as an internal or external command, 1>operable program or batch file. 1>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): error MSB6006: "cmd.exe" exited with code 9009.

显然 MIDL 正在运行,我需要为 TMPLIB 安装哪些额外的 Visual Studio/Windows 组件?

正如 Simon 在评论中指出的那样,TLMIMP.exe 是一个标准的 VS 工具。根据使用的 Windows SDK,它应该位于:

  • C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\TlbImp.exe
  • C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 工具

您可能安装了多个版本,构建期间使用的版本将取决于您的 %PATH 变量。这通常会在您 运行 Visual Studio 开发人员命令提示符时设置(我假设如果您在 IDE 中构建它会自动完成)。

我的问题实际上是我正在使用 Azure Devops 进行构建,它不会自动将此文件夹添加到构建路径。