Xamarin形式:System.TypeLoadException-清理,删除bin和obj文件夹,并且构建不起作用 [英] Xamarin forms: System.TypeLoadException - Clean, remove bin and obj folders and build not working

查看:136
本文介绍了Xamarin形式:System.TypeLoadException-清理,删除bin和obj文件夹,并且构建不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在中问了有关此问题的问题这里.但是我到达那里的解决方案现在无法正常工作. 解决方案很干净,删除bin和obj文件夹并重建.

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.

异常详细信息:

引发的异常:System.Private.CoreLib.ni.dll中的"System.TypeLoadException" System.Private.CoreLib.ni.dll中发生类型为'System.TypeLoadException'的异常,但未在用户代码中处理 无法从程序集"Xamarin.Forms.Core,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = null"中加载类型"Xamarin.Forms.Xaml.XamlResourceIdAttribute".

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

屏幕截图:

将xamarin表格从2.5.0.121934更新到3.4.0.1008975后,我遇到了这个问题.问题仅在于UWP部分. Android和IOS应用程序运行良好,对此有什么解决方案?

推荐答案

我通过以下方式解决了这个问题.

I solved this problem in the following way.

我刚刚更新了项目中的所有其他NuGet软件包,并进行了清理,删除bin和obj文件夹并进行了重建.完成这些操作后,还要卸载和重新加载项目,这些异常会从我的项目中消失.在StackOverflow的某个地方,我有了更新所有其他NuGet软件包的想法.

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.

这篇关于Xamarin形式:System.TypeLoadException-清理,删除bin和obj文件夹,并且构建不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆