2

I'm getting TinyIOC Unable to resolve type exception. I have developed my app using Xamarin studio for ipad. In simulator it is working fine. But on deploying ipad i'm getting below error.

TinyIoC.TinyIoCResolutionException: Unable to resolve type: IOSLoginViewModel ---> System.Exception: Unable to resolve type: IOSLoginViewModel ---> System.Exception: Unable to resolve type:

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
    }

Above method is returning value on simulator but for ipad it is giving null.

Lines of code I have used is

var tContainer = TinyIoC.TinyIoCContainer.Current;
tContainer.Register<IOnlineAuthenticationService, Framework.OnlineProvider.AuthenticationService>().AsMultiInstance(); 


DataContext = TinyIoC.TinyIoCContainer.Current.Resolve<IOSLoginViewModel>();

IOS Build options I have tried all, Linking - SDK, ALL, No but still same error.

Stephane Delcroix
  • 16,134
  • 5
  • 57
  • 85
user2996219
  • 21
  • 1
  • 2

1 Answers1

6
  1. In Xamarin Studio, open "Run" -> "Exceptions" and add "System.Exception". Run your
  2. Run you app
  3. When the error occurs, take a look at the exception object's InnerException property which will give you clues why the type could not be resolved.
Oliver Weichhold
  • 10,259
  • 5
  • 45
  • 87