It appears that the code inside one dll cannot load a class from outside of it's own dll.
To demonstrate the problem I included the two source files and the assembly.
The indicator is called TestLoader, which dynamically loads a class called "MyNamespace.MyClassName" using the lines:
string cls = "MyNameSpace.MyClassName"; Type t = Type.GetType(cls , true, false); SimpleInterface customClass; if (t != null) { customClass = (SimpleInterface)Activator.CreateInstance(t); Print(Name + " SUCCESS! loaded: " + customClass.getName()); }
However, when I do these steps it does NOT work:
-Build the assembly and install it into Ninja on a different machine.
-Copy the source code for MyClassName to that machine and compile.
-Put TestLoader on a chart and run it. The output window shows it does not work.
Is there a way to make ninja build the assembly so it can load that class?
What can I do to make that class dynamically loaded?
Is there a different windows call that would find the class outside the dll?
See attached assembly and source files for example.
BTW, The reason for this code is to allow a bit of customization by user of assembly.
Thanks,
Gary
Comment