0
votes

As we know that in .NET Desktop app there was Compilation & Execution :
Like C# -> MSIL -> NC(Win32)

What is the cycle for metro apps in .NET Framework 4.5?
is it C# -> WinRT or C# -> MSIL -> WinRT?

Can anyone give a good and concise explanation on Compilation & Execution Lifecycle for Metro App?
And at Coding time does it use .NET Library or WinRT Library?

1

1 Answers

0
votes

C# is not compiled to WinRT per se. When you create a Windows Runtime component in C#, the C# component itself is hosted in a special .NET process just like any other .NET component would be. The fact you compile to WinRT simply means a wrapper is automatically created that allows other languages to interface with it. This is one of the reasons why it is important to choose carefully between implementing WinRT components in C# or C++, for example, because C# will take on the extra overhead of a dependency on the .NET framework.

So technically it is C# -> MSIL and then there is a WinRT facade.

It's also a little bit of a misnomer to compare them. C# is a language. MSIL is a language. WinRT is a runtime. Multiple languages can co-exist in WinRT, what makes something part of WinRT is the metadata that is generated to describe the signature of the API for the components.

For a more detailed breakdown on exactly what is happening, please read:

http://msdn.microsoft.com/en-us/magazine/jj651570.aspx