namespace Platform::Collections not found RRS feed

  • Question

  • I used the code below, it worked well.

    IVector<int>^ vector = ref new Platform::Collections::Vector<int>;

    // operation with vector ...

    but now platform::Collections is no available in the new version of VS11 Beta. what should i do?
    • Edited by josing Thursday, May 24, 2012 10:54 AM
    Thursday, May 24, 2012 10:52 AM


All replies

  • Hi,

    #include <collection.h>
    using namespace Platform::Collections;
    using namespace Windows::Foundation::Collections;

    Thursday, May 24, 2012 2:35 PM



    Which type project did your create?

    You should create the metro style C++ project, not the general native C++ project.


    Sometimes, the intellisense does not work well, you can try to build the project first.


    Best regards,


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 25, 2012 6:57 AM
  • In a XAML page code behind .cpp you get this for free in our templates. If you are in a WinRT DLL project template or other .cpp you will likely need the additions t-n-x provided.

    David Lamb

    Friday, May 25, 2012 4:53 PM