我得到TinyIOC无法解决类型异常.我使用Xamarin studio for ipad开发了我的应用程序.在模拟器中它工作正常.但在部署ipad时,我遇到了错误.
TinyIoC.TinyIoCResolutionException:无法解析类型:IOSLoginViewModel ---> System.Exception:无法解析类型:IOSLoginViewModel ---> System.Exception:无法解析类型:
private IEnumerable<ConstructorInfo> GetTypeConstructors(Type type)
{
//#if NETFX_CORE
// return type.GetTypeInfo().DeclaredConstructors.OrderByDescending(ctor => ctor.GetParameters().Count());
//#else
return type.GetConstructors().OrderByDescending(ctor => ctor.GetParameters().Count());
//#endif
}
Run Code Online (Sandbox Code Playgroud)
上面的方法是在模拟器上返回值,但对于ipad,它给出null.
我用过的代码行是
var tContainer = TinyIoC.TinyIoCContainer.Current;
tContainer.Register<IOnlineAuthenticationService, Framework.OnlineProvider.AuthenticationService>().AsMultiInstance();
DataContext = TinyIoC.TinyIoCContainer.Current.Resolve<IOSLoginViewModel>();
Run Code Online (Sandbox Code Playgroud)
IOS构建选项我已经尝试了所有,链接 - SDK,ALL,No但仍然是相同的错误.