I try to lead the types from an .dll (which is also referenced in the executing project). I call:
public static void LoadPlugin(string pluginFile)
{
Assembly assembly = Assembly.LoadFrom(pluginFile);
foreach (Type type in assembly.GetTypes())
{
// play with it
}
}
It loads just a few of them:
public partial class Mathematics : UserControl, IMathematics, IPortable
and
public partial class Welcome : UserControl
but the next one, and some others, are ignored:
public partial class Test : UserControl, ITest, IPortable
They all stand in the same assembly, under the same namespace. The public static void LoadPlugin(string pluginFile)
method is located in other assembly that is also referenced in the executing project.
No exceptions are thrown. What could be the issues for not loading all the types? Any ideas?