locked
Building C++ app with C# library error WMC1006

    Question

  • When I add a C# project reference to my C++  metro app, I get the following two errors upon build:

    error WMC1006: Cannot resolve Assembly or Windows Metadata file 'System.Runtime.dll'
    error WMC9999: Type universe cannot resolve assembly: System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

    I'm not even using anything from the library yet, I've just included the reference...

    Help?

    Thanks!

    Eric

    Wednesday, June 20, 2012 6:15 AM

Answers

  • You can't directly reference a managed dll in a native project. You should change the output type to "winmd" and then your solution should build without errors.

    If you are still running into issues, please send me an email at navits at microsoft dot com and I can help.

    -Navit Saxena

    • Proposed as answer by navits - MSFT Wednesday, June 20, 2012 7:41 AM
    • Marked as answer by Carbaholic Sunday, June 24, 2012 2:49 AM
    Wednesday, June 20, 2012 7:41 AM