0
votes

I already asked a question about this issue on here. But the solution I got there is not working now. The solution was clean, remove bin and obj folders and rebuild.

Exception details:

Exception thrown: 'System.TypeLoadException' in System.Private.CoreLib.ni.dll An exception of type 'System.TypeLoadException' occurred in System.Private.CoreLib.ni.dll but was not handled in user code Could not load type 'Xamarin.Forms.Xaml.XamlResourceIdAttribute' from assembly 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'.

Screenshot:

enter image description here

I have this problem after updating xamarin forms to 3.4.0.1008975 from 2.5.0.121934. Problem is only on the UWP part. Android and IOS apps are working fine, what is the solution for this?

2
does a referenced component have still have any dependency on XF 2.5?magicandre1981
@magicandre1981 How can I check that?Sreejith Sree
Have your updated the xamarin.forms nuget package version in the forms project?Nico Zhu - MSFT
Yes, updated to 3.4.0.1008975 from 2.5.0.121934.Sreejith Sree
Could you mind share a mini sample?Nico Zhu - MSFT

2 Answers

2
votes

I solved this problem in the following way.

I just updated all the other NuGet packages in my project and do clean, delete bin and obj folders and rebuild. Also unload and reload projects, after doing these things that exception vanished away from my project. Somewhere in StackOverflow, I got that the idea of updating all the other NuGet packages.

0
votes

I have all of my NuGet packages updated. Nevertheless, a

System.TypeLoadException: 'Could not resolve type with token 01000083..

remains!

So i checked my visual studio 2019 for some new updates and there exists. Issue resolved after the update has been finished. so:

  1. Update Visual Studio to the latest version
  2. Clean Solution
  3. Close IDE
  4. Delete all bin & obj folders from all projects (Forms, Android and IOS)
  5. Open IDE, Rebuild Solution, Run & have fun :)

Hope it helps.