title: Use a C++/CLI dll in a .NET Core 2 application
body: <p>Is it possible to use a .NET C++/CLI DLL from a .NET Core 2 application on Windows?</p>
  
  <p>I have a DLL built with <code>&lt;TargetFrameworkVersion&gt;v4.6.1&lt;/TargetFrameworkVersion&gt;</code>. From a .NET Core test app, I do:</p>
  
  <pre><code>Assembly.LoadFrom("mycliassembly.dll");
  </code></pre>
  
  <p>And I receive this exception:</p>
  
  <blockquote>
    <p>Could not load file or assembly ... Format of the executable (.exe) or
    library (.dll) is invalid.</p>
  </blockquote>
  
  <p>So the obvious answer would be no. But.. is there a way, assuming we are talking about Windows only?</p>