The problem is that Activator.CreateInstance
does not return ExpandObject (dynamic).
You should run test() by reflection, like this :
foreach (Type type in DLL.GetExportedTypes())
{
dynamic c = Activator.CreateInstance(type);
MethodInfo methodInfo = type.GetMethod("test");
methodInfo.Invoke(c , null);
}
2
solved Trying to show a Windows Form using a DLL that is imported at the runtime in a console application