3

I originally assumed that Metro style apps were managed (.NET) assemblies whether they are written in C# or C++ and I thought C++ for Metro style apps would be similar in concept to C++/CLI.

However, I now heard on a DotNet Rocks podcast that Metro style apps written in C++ are native. Nevertheless I understand that Metro style apps run on all three CPU architectures Metro is available for. How is this accomplished? Do Metro style apps come with different binaries and only one is chosen/downloaded? Or is it like on Mac OS X where one binary can contain code for different CPUs?

Andrew J. Brehm
  • 4,448
  • 8
  • 45
  • 70

2 Answers2

0

Code that uses only system or OS services from WinRT can be used within an app and distributed through the Windows Store for both WOA and x86/64.

from this MSDN blog page

holtavolt
  • 4,378
  • 1
  • 26
  • 40
0

If you go watch this BUILD video things should start to clear up -- http://channel9.msdn.com/events/BUILD/BUILD2011/TOOL-930C (A .NET developer's view of Windows 8 app development)

Basically there is a CLR (.NET 4.5) running. I didn't say a full CLR. WinRT from a .NET perspective is just a .NET Profile (sort of a way that they can layout the API differently exposing or hiding things). The new WinRT APIs use a new version of [gulp] COM, but it is optimized for use with .NET. I'm not 100% sure on the C++ angle. I suspect with C++, you have a few options. Compile for each platform (arm and x86) or compile to IL. Not sure if this helps you at all (I hope so).

DevTheo
  • 911
  • 6
  • 13
  • I knew about the CLR bit. I am wondering how they manage to get native code for three platforms into one binary or how they solved that problem. – Andrew J. Brehm Mar 26 '12 at 15:57
  • Yeah, I don't really know if they have explained it to us, yet.. (too much secrecy at this point regarding WOA) – DevTheo Mar 28 '12 at 15:39