Skip to content

System.DllNotFoundException: Unable to load DLL 'libwkhtmltox' when deploying on Windows 2016 #33

@seblucas

Description

@seblucas

Hi,

I saw this use case was already mentioned in other issues but I found a strange workaround.

So first some information about my environment : I'm using DinkToPdf along with some fixes provided by #18 . Everything work natively with VS2017 in a .net core 2.0 (AspNet core), I can generate any PDF I want without any problem, any errors (and without loading explicitly any DLL).

I deployed it on a Windows 2016 Server and I got the infamous System.DllNotFoundException. I tried a lot of things but finally I added in the root of my project the libwkhtmltox.dll coming from the 0.12.3.2 windows 64bits package. And it worked perfectly fine. Swapping it with 0.12.4 does not work at all (DllNotFoundException). I tried to use the latest alpha and even if I did not have a System.DllNotFoundException, I didn't get any PDF output (did not spend any time debugging it).

If I read wkhtmltox changelog they switched from VS2013 to VS2015 with 0.12.4.

Can somebody with access to Windows server 2016 test and confirm ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions