无法部署 ML.net、"missing" FastTreeNative.dll

Unable to deploy ML.net, "missing" FastTreeNative.dll

我有一些使用 Microsoft ML.net 库(通过 nuget)的 C# 代码(VS2017、.Net 4.71)。它在我自己的 Windows 10 开发机器上运行良好,但是当我将它部署到生产服务器时,出现异常

(Inner Exception #0) System.DllNotFoundException: Unable to load DLL 'FastTreeNative': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

服务器是 Windows Server 2016 x64,安装了 .Net 4.71,代码是针对 x64 构建的。 FastTreeNative.dll 在可执行路径中。在 a related issue 之后,我已经从 packages.config 移动到 PackageReference - 都无济于事。我能做些什么来查明为什么这个 DLL 没有被加载?

我用dumpbin查看了FastTreeNative.dll

的依赖
Microsoft (R) COFF/PE Dumper Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file FastTreeNative.dll

File Type: DLL

  Image has the following dependencies:

    VCRUNTIME140.dll
    KERNEL32.dll
    api-ms-win-crt-runtime-l1-1-0.dll

VCRUNTIME140 是 Visual Studio C++ 可再发行组件。一次快速download,稍后安装,问题解决!