Could not resolve type with token 01000012

I've been developing my app now for at least 5 months. I've been wanting to try the xamarin previewer so i updates visual studio xamarin forms and then i updated my nuget xamarin forms for my portable, ios and android.

now when i try to debug the application on the device i get

System.TypeLoadException: Could not resolve type with token 01000012

on this line

global::Xamarin.Forms.Forms.Init(this, bundle);

which i find very odd

origionally my xamarin forms nuget version was 2.3.3.168

so i thought id update to the stable version which was the same version number 2.3.3.168 but it had "stable" beside it

i've downgraded again but still get the same error.

any thoughts

thanks

Answers

  • CostasAletrariCostasAletrari USMember ✭✭

    ok,, by choosing detailed for my debug output window i found that it was due to xamarin.forms.maps not being updated to the latest version and it solved the issue

  • PawKanarekPawKanarek USMember ✭✭

    This is happening after update xamarin.forms...

  • dafdaf JPMember

    I got this exception when I installed Rx package (System.Reactive.Linq) with nuget only on a core project of my Xamarin.Forms project.
    It was solved after installing it to iOS project.

  • RobinSchroeder.8683RobinSchroeder.8683 USMember ✭✭

    @EllenK said:
    I had a similar issue: xamarin System.TypeLoadException: Could not resolve type with token 01000037
    After removing all bin and obj folders, the error automatically went away. Very strange.

    Agree with @EllenK, had to delete ALL bin and obj.

  • MayurKerasiyaMayurKerasiya USMember ✭✭

    @EllenK Thank you your solution worked for me

  • igormonteiro.0167igormonteiro.0167 USMember ✭✭

    I had different xamarin forms versions in my solution..when I change to unique version.. works

  • ParamjitSinghParamjitSingh USMember ✭✭

    @Vulcan said:

    Do you have using XAML Compilation, disable it and rebuild.

    https://developer.xamarin.com/guides/xamarin-forms/xaml/xamlc/

    Thanks I was getting the following error:-
    Unhandled Exception:System.TypeLoadException: Could not resolve type with token 01000024 (from typeref, class/assembly Xamarin.Forms.Internals.ResourceLoader, Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null) occurred
    When i comment out the "[XamlCompilation(XamlCompilationOptions.Compile)]" from my xaml.cs page the problem was resolved.>

  • Miki93Miki93 DOMember ✭✭

    @Vulcan said:
    Do you have using XAML Compilation, disable it and rebuild.

    https://developer.xamarin.com/guides/xamarin-forms/xaml/xamlc/

    Exellent. Your solution worked for me. Thanks!!

  • FedericoCalvagnaFedericoCalvagna USMember ✭✭

    @igormonteiro.0167 said:
    I had different xamarin forms versions in my solution..when I change to unique version.. works

    Thanks! This solution worked for me. On Android I had a different version for Xamarin.Forms package

  • NiteshLuharukaNiteshLuharuka USDeveloper Group Leader ✭✭

    @igormonteiro.0167 said:
    I had different xamarin forms versions in my solution..when I change to unique version.. works

    This worked for me as well.

  • JanFrostJanFrost DEMember ✭✭

    @igormonteiro.0167 said:
    I had different xamarin forms versions in my solution..when I change to unique version.. works

    Thank you this solved my problem

  • BasseySimonBasseySimon USMember
    edited October 2017

    I just encountered this error on the Droid project of a Xamarin forms app i am working on, and turns out to be that the version of Xamarin.Forms package i had on Droid was out of sync with the version of the same package on the iOS project. I simply updated the package, cleaned and rebuilt my project and everything worked fine.

  • razishrazish DEMember ✭✭

    @JeremyMcQuivey said:
    Cleaning and rebuilding the solution worked for me.

    That worked for me as well.
    Thanks for the hint.

  • SimonBirkSimonBirk USMember
    edited November 2017

    @igormonteiro.0167 said:
    I had different xamarin forms versions in my solution..when I change to unique version.. works

    I had the same problem. As it turned out, i had different versions of Xamarin.Forms.

  • GuillermoZepedaGuillermoZepeda USMember ✭✭

    In my case, the error was coming from sqlite-net-pcl nuget package, and I had different versions installed for the PCL and UWP and a different one for Android and iOS.

    After having everything on the same version, the app ran successfully on Android.

    Just a recommendation to check the nuget packages at a solution level to make sure you are running the correct versions, and in some cases the same versions across projects.

  • pnet1pnet1 USMember ✭✭✭✭
    edited January 2018

    @StephaneDelcroix, i read your post on StackOverflow and i didn't get it:

    make sure all of your projects are aligned in version

    and how do i know what package are in different version? My case is: I copied all classes and xaml from another project to my project. But all pacakge i installed in my PCL and Android project. That other project is .Net Library and my project is PCL.

  • MatthewJoughinMatthewJoughin ZAMember ✭✭

    I solved this by removing GCM from a reference component - it was somehow explicitly referenced! because it was older than all of the other google packages it caused this issue! bottom line - make sure every component you are using is from nuget!

  • DanielNadbabiDanielNadbabi DEMember ✭✭

    I had that issue:
    System.TypeLoadException: Could not resolve type with token 01000173 (from typeref, class/assembly Xamarin.Forms.Xaml.XamlResourceIdAttribute, Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null)

    after updating the Telerik controls, so have to revert my changes for Telerik dlls

  • Disabling XAML Compilation fixed it for me

  • jddjdd USMember ✭✭✭

    thanks to @igormonteiro.0167
    I had different versions of Xamarin.Forms.
    For all projects

    • Updating to get the same version of Xamarin.Forms,
    • deleting bin and obj
    • and rebuilding
      solved the issue.
  • nick5454nick5454 USUniversity ✭✭✭

    The issue is that it's expecting a method which doesn't exist, at least for me. Right click - manage nuget on the solution file and apply Xam Forms to the .App, iOS, and Android project and this fixes it. Assuming you're on .net standard

Sign In or Register to comment.