I have some C# code (VS2017, .Net 4.71) that uses the Microsoft ML.net library (via nuget). It works fine on my own Windows 10 development machine, but when I deploy it to a production server, I get the exception
(Inner Exception #0) System.DllNotFoundException: Unable to load DLL 'FastTreeNative': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The server is Windows Server 2016 x64, with .Net 4.71 installed, and the code is built to target x64. FastTreeNative.dll
is in the executable path. Following a related issue, I've moved from packages.config
to a PackageReference - all to no avail. What can I do to track down why this DLL isn't being loaded?
I used dumpbin
to look at the dependencies of 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 is the Visual Studio C++ Redistributable. Once quick download and install later, the problem is solved!