I have a C++/CLI interface defined in a C++ library (Compiled with the /clr switch) I also have a C# library.
My C# library defines: - a class that implements Prism IModule interface. - a class that implements the C++/CLI interface and is decorated with MEF Export attribute.
both the C# and the C++\CLI library are deployed into the same folder.
I am getting a ModuleLoadException from Prism saying that it can't find my C++/CLI assembly or one of its dependencies.
If I replace the C++/CLI assembly with a .NET one, everything works fine!
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?
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.