title: Native DLL in LINQPad
body: <p>I am referencing the NuGet package <code>ABCpdf</code>, which provides a managed DLL <code>abcpdf.dll</code> and four pairs of native DLLs, in x86 and x64 varieties:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Queries that run in a LinqPad that need one or more of these DLLs fail, unless I manually copy all these DLLs to <code>%PROGRAMFILES%\LINQPad5</code>, as suggested <a href="https://stackoverflow.com/a/34834789/864696">here</a> by the LINQPad author @joe-albahari.</p>
  
  <p>That was in 2016. Is there any more automatic way in 2018? </p>
  
  <p>I tried adding a reference to the native DLL in the query properties; that generates this error</p>
  
  <pre><code>CS0009 Metadata file '..\ABCpdf11-64.dll' could not be opened -- PE image doesn't contain managed metadata.
  </code></pre>
  
  <p>And I tried using the <strong>Copy all non-framework references to a single local folder</strong> option, which <em>sounds</em> like it's designed for exactly this scenario. Unfortunately that didn't work either; still got this error</p>
  
  <pre><code>DllNotFoundException: Unable to load DLL 'ABCpdf11-32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
  </code></pre>