Skip to content

lib_lightgbm.dll is not getting loaded while running benchmarks on .NetFramework #1945

Closed

Description

@Anipik

when we try to run this https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs#L50
and
https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs#L47

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'

The benchmarks run properly on .NetCore

cc @danmosemsft @eerhardt @adamsitnik

Activity

  1. danmoseley commented on Dec 27, 2018

    @danmoseley

    @TomFinley who is the owner of the lightgbm package who can look at this?

  2. codemzs commented on Dec 27, 2018

    @codemzs
    Member

    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

  3. Anipik commented on Dec 27, 2018

    @Anipik
    ContributorAuthor

    I am getting this error in windows platform. I have not checked it for non-windows platform

  4. eerhardt commented on Jan 2, 2019

    @eerhardt
    Member

    @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.

  5. Anipik commented on Jan 2, 2019

    @Anipik
    ContributorAuthor

    @eerhardt I tried running it by specifying 64 bit its still not able to find the lighgbm dll

  6. artemiusgreat commented on Dec 30, 2019

    @artemiusgreat

    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.

    1. Local computer works fine - Windows Pro x64
    2. OVH VPS server works fine - Windows Server 2016 x64
    3. 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.

  7. ghost locked as resolved and limited conversation to collaborators on Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions