How does one load a WinRT assembly by name? When I do the following:
(new TextBlock()).GetType().GetTypeInfo().Assembly
Then I get the assembly 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 it says "Operation not supported". This happens even if I do this:
var name = (new TextBlock()).GetType().GetTypeInfo().Assembly.GetName();
Assembly.Load(name);
How can I get at WinRT assemblies by name?
As it currently stands (Windows 8 Developer Preview from Fall 2011), WinRT doesn't allow you to dynamically load and execute code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With