locked
Could not resolve type with token 01000012 RRS feed

  • Question

  • User118541 posted

    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

    Monday, November 28, 2016 10:18 AM

All replies

  • User118541 posted

    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

    Monday, November 28, 2016 10:33 AM
  • User116297 posted

    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.

    Tuesday, November 29, 2016 2:13 PM
  • User97202 posted

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

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

    Tuesday, November 29, 2016 2:16 PM
  • User234379 posted

    This is happening after update xamarin.forms...

    Wednesday, November 30, 2016 3:06 PM
  • User283963 posted

    Cleaning and rebuilding the solution worked for me.

    Wednesday, February 8, 2017 4:30 PM
  • User235139 posted

    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.

    Friday, February 10, 2017 10:48 AM
  • User241022 posted

    @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.

    Thursday, June 8, 2017 12:21 PM
  • User303810 posted

    @EllenK Thank you your solution worked for me

    Friday, July 7, 2017 4:59 AM
  • User291180 posted

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

    Monday, July 31, 2017 7:14 PM
  • User220854 posted

    @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.>

    Thursday, August 17, 2017 10:38 AM
  • User342887 posted

    @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!!

    Monday, September 11, 2017 2:36 PM
  • User16271 posted

    @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

    Saturday, October 7, 2017 10:09 PM
  • User32336 posted

    @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.

    Monday, October 9, 2017 1:44 PM
  • User14370 posted

    @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

    Thursday, October 12, 2017 9:09 AM
  • User352700 posted

    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.

    Wednesday, October 18, 2017 4:02 PM
  • User353223 posted

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

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

    Monday, October 30, 2017 8:32 AM
  • User61544 posted

    @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.

    Friday, November 3, 2017 6:25 AM
  • User1004 posted

    I once investigated this and gave an answer there https://stackoverflow.com/questions/41163887/could-not-resolve-type-with-token-0100000f/42511504#42511504

    Friday, November 3, 2017 7:42 AM
  • User270512 posted

    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.

    Tuesday, January 9, 2018 5:35 PM
  • User346487 posted

    @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.

    Tuesday, January 16, 2018 3:29 PM
  • User97623 posted

    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!

    Wednesday, July 4, 2018 2:39 PM
  • User345051 posted

    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

    Friday, September 14, 2018 2:25 PM
  • User382144 posted

    Disabling XAML Compilation fixed it for me

    Sunday, February 10, 2019 1:50 PM
  • User156231 posted

    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.

    Tuesday, February 19, 2019 10:45 AM
  • User72117 posted

    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

    Tuesday, April 9, 2019 12:44 PM
  • User38283 posted

    @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.

    In my case, update Xamarin.Forms to latest version first, once succeeded, update other packages then it will work,

    Tuesday, November 26, 2019 2:12 PM
  • User392525 posted

    As with many of the latter posts, ensuring you update NuGet on the Main, Android and IOS projects, not just the main project is the solution that worked for me.

    Friday, January 31, 2020 10:26 AM
  • User394759 posted

    @igormonteiro thanks ! I had no idea there are separate packages (for ios and android) .

    Thursday, May 21, 2020 10:10 PM
  • User395995 posted

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

    In my case I discovered that you have to update with the same version of Xamarin.Forms in the "NuGet Package Manager" in each of the solution projects: Code Share, Android, iOS and UWP My mistake was thinking that updating once was updated on all projects in the solution.

    Wednesday, July 29, 2020 5:47 PM