locked
C++ Metro Library can't be referenced in C# Metro Application ?

    Question

  • I have a solution with 2 projects, a C# Metro Application project and a C++ Metro Component Library project,

    but I can't use 'Add Reference' to add the C++ project to the references of C# project.

    I can reference this C++ project from a JavaScript Metro Application, but not from C#, is it supported or not ?

    Sunday, September 18, 2011 6:33 PM

Answers

All replies

  • I've seen in this Build Session, Under the cover with C++ for metro style apps, around 5-10 mins from start maybe,  that there is a small temporary glitch about that.

    You must clean your solution to be able to add the C++ reference to C# project.

    Sunday, September 18, 2011 9:36 PM
  • I think you don't need to clean the entire solution, just the C++ RT DLL project. That should workaround this bug.
    http://blog.voidnish.com
    Monday, September 19, 2011 4:10 PM
  • Once you add reference from C# to C++ WinMD, you also need to manually add reference of platform.winmd to your C# application. Platform.winmd is under <Visual Studio install Dir>\vc\bin. This issue is fixed in internal build.

    Li Shao, MSFT


    Li Shao
    • Proposed as answer by Atamiri Friday, October 14, 2011 8:54 AM
    Monday, September 19, 2011 9:17 PM
  • Adding the Platform.winmd reference after referencing the WinMD fixed my problem.
    • Edited by mobiletony Wednesday, November 30, 2011 5:49 AM
    Wednesday, November 30, 2011 5:49 AM
  • Where I can find platform.winmd in the new Customer Preview of Windows 8?
    Friday, March 2, 2012 12:25 PM
  • C:\Program Files\Microsoft Visual Studio 11.0\VC\vcpackages
    Sunday, March 4, 2012 10:07 AM
  • I am not able to use winrt sqlite in consumer preview of windows 8. Any help would be appreciated.
    • Edited by NikitaJain Monday, March 26, 2012 7:05 AM
    Monday, March 26, 2012 7:04 AM
  •     

          Do you  have  dll which is build  on ARM.??. Thank U

    Wednesday, June 6, 2012 3:15 AM
  • Do you  have  sqlite  dll which is build  on ARM.??. Thank U
    Wednesday, June 6, 2012 3:16 AM
  • “System.BadImageFormatException”类型的第一次机会异常在 AppTest1.exe 中发生
    “System.BadImageFormatException”类型的异常在 AppTest1.exe 中发生,但未在用户代码中进行处理
    其他信息: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)
    Thursday, July 19, 2012 9:46 AM
  • Hi,

    I have to develop a library project for Windows 8 Metro App, which further need to be used with a Windows 8 Metro project developed on any of the language i.e JavaScript or VB or VC++.

    So, my question is, Can we use or reference C# library project in VC++ or VB or JavaScript  Metro App project?
    Please reply me ?

    Regards,
    Rahul Jaiswal


    -- Regards, Rahul Jaiswal

    Thursday, March 7, 2013 8:47 AM