Unable to read DLL
See original GitHub issueI tried making my own project to test this out. I downloaded the 64 bit dll from your link and tried putting it in three different places
- The root folder (with the .csproj file)
- The folder with the solution file (One above root folder)
- The folder with the debug dll in it (bin\Debug\netcoreapp1.1)
I am still getting the same error: Is there somewhere else I should be putting the DLL? Thanks!
Edit: Here are the error details:
System.DllNotFoundException occurred
HResult=0x80131524
Message=Unable to load DLL 'libwkhtmltox': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=DinkToPdf
StackTrace:
at DinkToPdf.WkHtmlToXBindings.wkhtmltopdf_init(Int32 useGraphics)
at DinkToPdf.PdfTools.Load() in C:\Users\admin\Documents\DinkToPdf\src\DinkToPdf\PdfTools.cs:line 27
at DinkToPdf.BasicConverter.Convert(IDocument document) in C:\Users\admin\Documents\DinkToPdf\src\DinkToPdf\BasicConverter.cs:line 42
at DinkToPdf.SynchronizedConverter.<>n__0(IDocument document)
at DinkToPdf.SynchronizedConverter.<>c__DisplayClass5_0.<Convert>b__0() in C:\Users\admin\Documents\DinkToPdf\src\DinkToPdf\SynchronizedConverter.cs:line 27
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to Fix Unable to Load DLL/Error ...
About the Unable to Load DLL Error · Method 1: Reinstall the Program · Method 2: Disable the Auto-Startup of the Program ·...
Read more >Methods to Fix Error in Loading DLL at Startup
Error in loading DLL occurs when a program calls upon a DLL file to perform a certain task, and the specified DLL cannot...
Read more >Unable to access the DLL file
The solution is almost always to reinstall the program. It likely has a .dll library onboard and needs to replace the file. Reinstalling...
Read more >Failed to load DLL file on Windows 11/10 computer
Failed to load DLL file on Windows · 1] Reinstall the program · 2] Check startup programs · 3] Run Registry Cleaner ·...
Read more >4 Methods on How To Open DLL Files (With Example ...
Open the command prompt. You can open the command prompt by going to the Windows Start menu or by holding Windows Key+R and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If your OS is 64 bit then this is correct behavior. If you want to test with 32 bit library you must run it in 32 bit environment.
In thread safe console did you get expected PDF at the end?
This is right route to get PDF:
http://localhost:5000/api/convert
. Tested it again at my end without problems.I added Kestrel server profile to launchSettings.json:
Select Kestrel profile in VS: In browser go to route
http://localhost:5000/pdf
. Now you should get expected result. The reason that I added Kestrel profile is because this library is not compatible with IIS. Problem with IIS is how IIS manage app pools. To resolve that issue Remoting tools should be used but they are not supported in .NET Core.You see changes that i made to your project here.
Thanks for the quick response! It’s working on my machine as well with Kestrel.