I am following the instructions in the guide for Considerations for Compiled Assemblies, which I'm using. I'm using Reflection as it suggests and everything works fine on my dev machine. However, when I compile it to a protected assembly and try on my other laptop, I receive an error "Object reference not set to an instance of an object". I have used logging to find the exact line at which this happens. First I have this line, which works fine:
System.Type type = System.Type.GetType("NinjaTrader.NinjaScript.Chart Styles.OhlcStyle"); // NOTE: this forum is putting a space between ChartStyles, but this space is NOT in the code.
However, when I try to access the "type" object, I receive the error. This works just fine on my dev machine, so I have no idea why it's not working in a compiled assembly. I tried these to lines and they both failed with the same error:
Print(type.ToString());
and
System.Reflection.Assembly assembly = type.Assembly;
Please advise, as this seems like I'm following the exact instructions in the guide.
Thank you!

Comment