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

↘锁芯ラ 提交于 2019-11-28 12:43:14

问题


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:

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?


回答1:


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.



来源:https://stackoverflow.com/questions/53649224/xamarin-forms-system-typeloadexception-clean-remove-bin-and-obj-folders-and

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!