title: Calling C# programs from D
body: <p>How can I call C# functions (a DLL) from D?</p>
  
  <p>I have tried or am looking at the following:</p>
  
  <ul>
  <li><p>Using the Derelict Mono package
  (<a href="https://github.com/kubasz/derelict-mono" rel="nofollow noreferrer">https://github.com/kubasz/derelict-mono</a>)</p></li>
  <li><p>Using Unmanaged Exports (See<br>
  <a href="https://stackoverflow.com/questions/4428267/calling-c-sharp-from-c">Calling C# from C</a>), D
  to C to C#, eventually maybe eliminating the C.</p></li>
  </ul>
  
  <p>The Derelict Mono approach works well for Hello World programs, however a larger DLL (with references to lots of other assemblies, each of which may or may not use genuine Windows API calls) fails as the DLL is not properly loaded.</p>
  
  <p>Initial experiments with Unmanaged Exports result in errors with MSBUILD.</p>