I am trying to load a .NET assembly from a .NET 2.0 CF application. I want to invoke an internal method with three params like so:
var obj = new System.Web.Security.SqlMembershipProvider();
MethodInfo mi = obj.GetType().GetMethod("GenerateSalt",
BindingFlags.NonPublic | BindingFlags.Instance,
null, new Type[] {}, null);
object resObj = mi.Invoke(obj, new object[] {});
When the GetMethod call is executed, a InvalidProgramException is thrown. I can make this call from a regular .NET 2.0 console app test harness, but in .NET 2.0 CF it throws.
What is going on?