I'm using the MvvmCross framework to deliver cross-platform app using Xamarin. My Windows Phone application works absolutely file under the WP8 platform and fails with internal error under the WP7 platform. I'm using the single visual studio project (WP7 template) for both WP7 and WP8 platforms.
var setup = new Setup(RootFrame);
setup.Initialize();
And here the detailed stacktrace:
System.InvalidProgramException was unhandled
Message=InvalidProgramException
StackTrace:
at System.RuntimeType.GetConstructors(BindingFlags bindingAttr)
at Cirrious.CrossCore.IoC.MvxTypeExtensions.<CreatableTypes>b__1(Type t)
at System.Linq.Enumerable.<WhereIterator>d__0`1.MoveNext()
at System.Linq.Enumerable.<WhereIterator>d__0`1.MoveNext()
at Cirrious.CrossCore.Platform.MvxBootstrapRunner.Run(Assembly assembly)
at Cirrious.MvvmCross.Platform.MvxSetup.PerformBootstrapActions()
at Cirrious.MvvmCross.Platform.MvxSetup.InitializeSecondary()
at Cirrious.MvvmCross.Platform.MvxSetup.Initialize()
at MyApp.WP.App..ctor()
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(RuntimeConstructorInfo rtci, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at MS.Internal.TypeProxy.<>c__DisplayClass30.<GetCreateObjectDelegate>b__2a()
at MS.Internal.TypeProxy.CreateInstance(UInt32 customTypeId)
at MS.Internal.FrameworkCallbacks.CreateKnownObject(IntPtr nativeRootPeer, UInt32 customTypeId, String initializationString, IntPtr& nativePeer, UInt32 isCreatedByParser)
at MS.Internal.FrameworkCallbacks.CreateUnknownObject(String assemblyName, String typeName, IntPtr nativeRootPeer, String initializationString, UInt32& customTypeId, UInt32& coreTypeId, UInt32& typeFlags, IntPtr& nativePeer)
Any ideas how to diagnose and fix the issue?