title: Is it possible to Export a C++ CLI interface with MEF and Prism
body: <p>I have a C++/CLI interface defined in a C++ library (Compiled with the /clr switch)
  I also have a C# library.</p>
  
  <p>My C# library defines:
   - a class that implements <a href="http://msdn.microsoft.com/en-us/library/ff921153%28v=PandP.40%29.aspx" rel="nofollow">Prism</a> IModule interface.
   - a class that implements the C++/CLI interface and is decorated with <a href="http://msdn.microsoft.com/en-us/library/dd460648.aspx" rel="nofollow">MEF</a> <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.exportattribute.aspx" rel="nofollow">Export</a> attribute.</p>
  
  <p>both the C# and the C++\CLI library are deployed into the same folder.</p>
  
  <p>I am getting a ModuleLoadException from Prism saying that it can't find my C++/CLI assembly or one of its dependencies.</p>
  
  <p>If I replace the C++/CLI assembly with a .NET one, everything works fine!</p>
  
  <p>My question is then , is it at all possible to export a class that implements a C++\CLI interface with the export type being that interface?</p>
  
  <p>Why do I have the interface defined in a C++/CLI library? I was hoping that a legacy C++ DLL we have could actually define their contracts in that C++\CLI libraries and have C# libraries reference that contract dll.
  Maybe my approach is wrong, please let me know if you think there is a better way to achieve this.</p>