How to embed native dependencies of a DLL with Costura?
<p>I want to distribute my app as a single <code>.exe</code> file. </p>

<p>For that, I am using <code>Costura.Fody</code> to embed the dependencies of my app. However, the dependecy itself has native dependencies (<code>PdfiumViewer</code> NUGet package). Originally, these resided in the <code>x86</code>/<code>x64</code> folders, but I moved them to <code>costura32</code>/<code>costura64</code> respectively and set them as <code>Embedded resource</code>. </p>

<p>When I build the project, the <em>Output</em> tab displays that the <code>PdfiumViewer.dll</code> has been embedded. But when I run the program, there's an exception from <code>PdfiumViewer.NativeMethods</code>.</p>

<p>Can I achieve a single <code>.exe</code> file ? (I am on <code>.NET 3.5</code>)</p>

<hr>

<p>Since the native depencies have the same name (<code>pdfium.dll</code>) I believe <a href="https://stackoverflow.com/questions/34744702/how-to-embed-32-64bit-dlls-with-same-name-in-a-mixed-mode-exe">this question</a> is related.</p>