I\'m trying to use IronPython as an intermediary between a C# GUI and some C# libraries, so that it can be scripted post compile time.
I have a Class library DLL that is
You might try running your program under the debugger and breaking execution prior to the GetVariable call. Go to the "modules" window and see if there are two versions of your C# class library DLL loaded. If that's the case, then that's the explanation.
If that's the problem, then the solution is to make sure C# and Python worlds agree on the types. One solution is to put everything in the same directory. Another possibility is to set up a reference to your class library in C# by using the properties on the ScriptScope class (I think) to set an assembly reference to your class library assembly that will be available to the Python code. I don't have a hybrid C#/IronPython project immediately available to test against, but I remember seeing that functionality.