-1

I have a C++/CLI project which produce a DLL. C# project can successfully call this DLL.

Then I want to call this DLL in my windows phone project.

So I changed the C++/CLI project's "Property Page->general->Platform Toolset" to Windows Phone 8.0(v110). Then I changed its "Property Page->Platform" to Active(ARM).

after some bugs fixed, I try to reference new DLL in my windows phone project, only to receive this Error : "A reference to a higher version or incompatible assembly cannot be added to the project".

YOU CAN HEAR MY HEART BREAKS!!!

What I should do now? What kind of DLL can a windows phone project reference?? Or another way to import this project to windows phone project ??? Thanks.

Yinthewind
  • 55
  • 1
  • 6

1 Answers1

0

To have that work, you need to create a Windows Phone Runtime project that your main WP8 project can reference. In it, you can reference your c++/CLI dll and then create whatever wrapper/interface methods you need to do work on it. This previous question explains that process, along with a link to a sort-of tutorial on it.

Community
  • 1
  • 1
steveg89
  • 1,807
  • 2
  • 15
  • 29
  • Could not add a reference to file . because it is neither a .NET assembly nor a registered ActiveX control... – Yinthewind Aug 19 '13 at 03:13
  • Is that when adding the Win RT reference to the main project, or when adding the c++ reference to the Win RT project? – steveg89 Aug 19 '13 at 11:19