Native DLL in LINQPad

5

I am referencing the NuGet package ABCpdf, which provides a managed DLL abcpdf.dll and four pairs of native DLLs, in x86 and x64 varieties:

packages\ABCpdf\11.2.2\build\PrintHook64.dll
packages\ABCpdf\11.2.2\build\3DGlue11-32.dll
packages\ABCpdf\11.2.2\build\3DGlue11-64.dll
packages\ABCpdf\11.2.2\build\ABCpdf11-32.dll
packages\ABCpdf\11.2.2\build\ABCpdf11-64.dll
packages\ABCpdf\11.2.2\build\ChakraCore32.dll
packages\ABCpdf\11.2.2\build\ChakraCore64.dll
packages\ABCpdf\11.2.2\build\PrintHook32.dll

Queries that run in a LinqPad that need one or more of these DLLs fail, unless I manually copy all these DLLs to %PROGRAMFILES%\LINQPad5, as suggested here by the LINQPad author @joe-albahari.

That was in 2016. Is there any more automatic way in 2018?

I tried adding a reference to the native DLL in the query properties; that generates this error

CS0009 Metadata file '..\ABCpdf11-64.dll' could not be opened -- PE image doesn't contain managed metadata.

And I tried using the Copy all non-framework references to a single local folder option, which sounds like it's designed for exactly this scenario. Unfortunately that didn't work either; still got this error

DllNotFoundException: Unable to load DLL 'ABCpdf11-32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
linqpad
asked on Stack Overflow Sep 25, 2018 by Ross Presser • edited Oct 16, 2018 by Ross Presser

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0