You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lib_lightgbm.dll is not getting loaded while running benchmarks on .NetFramework #1945
on .netFramework, the benchmark is not able to load the lib_lightgbm.dll
Unexpected exception: Unable to load DLL 'lib_lightgbm': The specified module could not be found. (Exception from HRESULT: 0x8007007E), 'System.DllNotFoundException'
Are you getting this error on other non windows platform? Based on very quick search seems like windows upgrade error. This dll comes from a nuget that is published by @guolinke
@Anipik - can you try adding <RuntimeIdentifier>win-x64</RuntimeIdentifier> to your .csproj? By default, no RID is being specified - meaning you are building for "RID-agnostic" or "RID-less". Thus, no native assemblies are being copied from the NuGet packages. Setting win-x64 tells the build system to copy the x64 assemblies to the output folder.
OVH VPS server works fine - Windows Server 2016 x64
VULTR VPS doesn't load LightGbm DLL - Windows Pro x64
Tried various combinations of publishing, including Self-Contained deployment with configuration targeting Any CPU, x86, x64, but it didn't run on server #3. Only comparing list of installed programs I noticed that the only missing part on server #3 is MS Visual C++ Redistributable x64. I think I have this update on local computer because I have VS 2019 installed, server #2 is a Server Edition, so probably has this update by default, but server #3 was a custom installation of Windows Pro and it was missing it.
Reacted by vinipickrodt and suchoss
ghost locked as resolved and limited conversation to collaborators on Mar 25, 2022
Activity
danmoseley commentedon Dec 27, 2018
@TomFinley who is the owner of the lightgbm package who can look at this?
codemzs commentedon Dec 27, 2018
Are you getting this error on other non windows platform? Based on very quick search seems like windows upgrade error. This dll comes from a nuget that is published by @guolinke
Anipik commentedon Dec 27, 2018
I am getting this error in windows platform. I have not checked it for non-windows platform
eerhardt commentedon Jan 2, 2019
@Anipik - can you try adding
<RuntimeIdentifier>win-x64</RuntimeIdentifier>to your .csproj? By default, no RID is being specified - meaning you are building for "RID-agnostic" or "RID-less". Thus, no native assemblies are being copied from the NuGet packages. Settingwin-x64tells the build system to copy the x64 assemblies to the output folder.Anipik commentedon Jan 2, 2019
@eerhardt I tried running it by specifying 64 bit its still not able to find the lighgbm dll
artemiusgreat commentedon Dec 30, 2019
TL.TR - another way to fix this issue is to install Microsoft Visual C++ Redistributable x64
https://support.microsoft.com/en-ae/help/2977003/the-latest-supported-visual-c-downloads
This is how it happened.
Tried various combinations of publishing, including Self-Contained deployment with configuration targeting Any CPU, x86, x64, but it didn't run on server #3. Only comparing list of installed programs I noticed that the only missing part on server #3 is MS Visual C++ Redistributable x64. I think I have this update on local computer because I have VS 2019 installed, server #2 is a Server Edition, so probably has this update by default, but server #3 was a custom installation of Windows Pro and it was missing it.