locked
Will Windows 8 Metro support managed c++/cli

    Question

  • I can't seem to find an answer to this question anywhere, but will metro support managed c++ ?? Right now in Visual Studios 2012 RC it does not (in Metro only).

    I have some frameworks written in c++/cli and wanted to port them to Metro. I know c++/cx is similar, but my c++/cli objects derive from ones written in C# and it would suck to have to rewrite that part of my system (but ok if I do, I just need to know where to go from here).

    If there are plans to support it when Windows 8 actually comes out, I can wait.  Or if not I would like to know now so I can get to work on porting.

    ALSO: I want to point out that when I try and reference a c++/cx ".dll" from a different C# sln I get the error:

    {

    A reference to

    'C:\...\Video.D3D11.Component.dll' could not be added. Please make sure that the file is

    accessible, and that it is a valid assembly or COM component.

    }

    I feel this is a bug as I can reference a c++/cx component in a C# project if both the C# and C++/CX projs are in the same sln. Or am I missing something?


    • Edited by zezba9000 Friday, July 27, 2012 6:40 PM
    Friday, July 27, 2012 6:21 PM

Answers

  • No. C++/CLI is not supported for Metro style apps.

    Metro style apps can be written in C++/Cx. If you want to use managed code then you can use C# or VB. Whether you are using native C++/Cx or managed C# or VB you will use the same Windows Runtime classes.

    You should be able to reference a C++/Cx WinRT Component DLL from a Metro style app in C#. See Creating Windows Runtime Components for details. If you still have problems please create a new thread with exact details of what you are doing, what behavior your are getting, and what behavior you expect.

    --Rob

    • Marked as answer by zezba9000 Friday, July 27, 2012 9:06 PM
    Friday, July 27, 2012 8:18 PM
    Owner

All replies

  • No. C++/CLI is not supported for Metro style apps.

    Metro style apps can be written in C++/Cx. If you want to use managed code then you can use C# or VB. Whether you are using native C++/Cx or managed C# or VB you will use the same Windows Runtime classes.

    You should be able to reference a C++/Cx WinRT Component DLL from a Metro style app in C#. See Creating Windows Runtime Components for details. If you still have problems please create a new thread with exact details of what you are doing, what behavior your are getting, and what behavior you expect.

    --Rob

    • Marked as answer by zezba9000 Friday, July 27, 2012 9:06 PM
    Friday, July 27, 2012 8:18 PM
    Owner
  • Tnx for the info about C++/CLI not going to be supported in Window 8 Metro.  I can use C++/CX if can get my Visual Studios 2012 issue resolved.

    I have posted another forum thread about the issue I was having in more detail as you requested.

    Friday, July 27, 2012 9:03 PM