Silverlight Assembly.Load () only works with full / strong name

Apparently, the implementation of Assembly.Load () in Silverlight requires a full / strong name.

eg. it works:

Assembly.Load("MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=...");

until this works, even if MyAssembly is already loaded:

Assembly.Load("MyAssembly");

Is there a workaround to use a simple name?

+3
source share
2 answers

, Silverlight . ( , ) -. , XAML , , ( ), -

XamlReader.Load("<my:ClassName xmlns:my='clr-namespace:MyNamespace;assembly=MyAssemblyShortName' />")

.

+2

, , , typeof , , :

var assembly = typeof(MyNamespace.SubNamespace.Type).Assembly;
0

Source: https://habr.com/ru/post/1749416/


All Articles