Using GemBox PDF version 17.0.1342 via nuget package.
I have some GemBox PDF code in a class library, which works fine when the class library targets .NET framework 4.7.2 (and consequently using the .NET framework version of the GemBox PDF dlls).
I then created another version of that class library, but this time the class library targets .NET Standard 2.0. Everything builds fine, but when running the code, I get an exception like:
==
System.DllNotFoundException
HResult=0x80131524
Message=Unable to load DLL ‘libHarfBuzzSharp’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=HarfBuzzSharp
StackTrace:
at HarfBuzzSharp.HarfBuzzApi.hb_buffer_create()
at …ctor()
at .(Object , Boolean , Double )
at GemBox.Pdf.Content.PdfFormattedText.()
at GemBox.Pdf.Content.PdfFormattedText.()
at GemBox.Pdf.Content.PdfFormattedText.get_Width()
The image shows the dlls in the test application’s bin directory. I’ve crossed out (in red) assemblies used by my app which shouldn’t be relevant for this problem. The test app is a winforms application, targeting .Net framework.
I can see the dll HarfBuzzSharp.dll, but no libHarfBuzzSharp.dll.
Any ideas ?
(In case you are wondering why I can’t just use the .NET framework version of GemBox PDF dlls - I have to build the class library targeting .Net Standard 2.0, as the intent is in future it will be used by other applications that need it in .Net Standard 2.0. )