Downloading the WinRT assembly from .NET.

How to load WinRT assembly by name? When I do the following:

(new TextBlock()).GetType().GetTypeInfo().Assembly

Then I get the assembly of Windows.UI.Xaml.Controls. But if I try to load it by name:

var name = new AssemblyName { 
   Name = "Windows.UI.Xaml.Controls", 
   Version = new Version(255, 255, 255, 255), 
   ContentType = AssemblyContentType.WindowsRuntime 
};

Then he says: "Operation is not supported." This happens even if I do this:

var name = (new TextBlock()).GetType().GetTypeInfo().Assembly.GetName();
Assembly.Load(name);

How can I get WinRT builds by name?

+5
source share
1 answer

Like at the moment (Windows 8 Developer Preview from Fall 2011), WinRT does not allow dynamically loading and executing code .

+3
source

All Articles