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)
lib
subfolder; they exist only in thebuild
subfolder. I'll contact the vendor and see if they will change (or if they have a justification); and I'll also try manually copying them to thelib
subfolder after adding the nuget. Doing that, even manually, "feels" better than copying them to%PROGRAMFILES%\LINQPad5
. – Bedraggled