title: Calling p/invoke on cross platform (ubuntu/windows) with library that contains dots
body: <p>I am trying to develop a program in C# that builds and runs both in linux (ubuntu 18.04) and Windows, which references a C++ library (via p/invoke - <code>dllimport</code>). My dll is imported as a <code>EmbeddedResource</code>, but I have also tried <code>None Include = "..."</code></p>
  
  <p>My C++ dll/so contains dots in the naming, and this is giving me a headache.</p>
  
  <p>If I rename my file to have no dots, it works fine. When I add dots, if I do not add the extension (i.e. <code>.dll</code> in windows), I get a <code>DllNotFoundException</code>, and obviously I do not want to mention the extension name since I want to cross compile it.</p>
  
  <p>Example:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public const string DllImport = @"myLib110";
  
  [DllImport(DllImport)]
  public static extern IntPtr myFun(float[] input);
  </code></pre>
  
  <p>Works fine with <code>myLib110.dll</code></p>
  
  <p>Where:</p>
  
  <p><code>public const string DllImport = @"myLib1.1.0";</code></p>
  
  <p>Breaks for file <code>myLib1.1.0.dll</code>.</p>
  
  <p>In addition: </p>
  
  <p><code>public const string DllImport = @"myLib1.1.0.dll";</code></p>
  
  <p>Works fine, but I want to cross compile, so that will not work for linux, where my lib is a <code>.so</code> file.</p>
  
  <p>Any tips/suggestions ? I also tried most of <code>DllImport</code>'s additional input arguments without any luck.</p>