xamarin.formsuwptypeloadexception

Xamarin forms: System.TypeLoadException - Clean, remove bin and obj folders and build not working


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?


Solution

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