4
votes

I just tried to dive a little bit deeper into the relation between .NET 4.5 / .NET 4.5 for Metro-style apps / WinRT.

What I figured is that the Reference Assemblies for .NET Metro (which lay in Program Files(x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5) define the System.String type in the Reference Assembly System.Runtime. However, the Reference Assemblies for "regular" .NET 4.5 define the System.String type in mscorlib whereas the System.Runtime Reference Assembly is empty.

First I thought that might be caused because metro based apps might be using a different string implementation which is necessary to communicate with the native WinRT layer. However, I tried the following code in a Console app as well as in a Metro Style app:

System.String k = "abc"; var m = k.GetType().AssemblyQualifiedName.

And guess what: In both cases the hosting assembly for the string is the very same mscorlib.

So why did Microsoft not simply define all these primitive types in mscorlib as they've always used to?

Thanks, TH

1
That's [TypeForwardedTo] at work. Blog post is here: wintellect.com/CS/blogs/jeffreyr/archive/2011/09/20/…Hans Passant

1 Answers

0
votes

It can't be same library. Because classic framework doesn't work on ARM architecture.

Check this video for details about types in Metro UI