I have a windows phone 8 app created with Visual Studio 2012 - "Windows Phone Direct3D App (Native only)" project under Visual C++, and a library created with "Windows Phone Class Library" project under Visual C# group having target platform "Windows Phone OS 8.0". All I need is to consume the C# dll in the C++ code. The restriction is that I cannot change the architecture of the application, so the main entry-point must be in the C++ project, and from here to call somehow the code written in C#.
If I try to reference the C# dll in C++ app I get this error
a reference to [dllname] cannot be added because the two projects target different runtimes.
Based on http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj714080(v=vs.105).aspx , I tried also to reference the C# dll indirectly through a Visual C++ "Windows Phone Runtime Component" but again I get the same error when I try to add reference to the runtime component. I tried to change some project settings and nothing worked. In all samples and demos which I found on the web, for WP8, the main entry-point is always in C#. Only some hints regarding windows store apps seem to indicate that could be possible to consume C# from C++, but I don't find any reference saying explicitly that my scenario on wp8 is possible or impossible.
Thanks in advance to anybody which shares the solution or any suggestion.