更新Nuget导致未处理的异常:System.TypeLoadException [英] Updating Nuget caused Exception Unhandled: System.TypeLoadException

查看:243
本文介绍了更新Nuget导致未处理的异常:System.TypeLoadException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于测试目的,我正在启动一个新的xamarin主页面,并更新了xamarin.android.support和xamarin.forms版本的nuget软件包.然后,我的程序得到异常:

I'm starting a new master xamarin page for testing purposes and updated the nuget packages for the xamarin.android.support and xamarin.forms version. Afterwards, my program gets the exception:

LoadApplication收到异常错误:

The LoadApplication gets the exception error:

    base.OnCreate(savedInstanceState);
    global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
    LoadApplication(new App());


Unhandled Exception:

System.TypeLoadException: Could not load type of field 'Xamarin.Forms.Platform.Android.RendererPool:_freeRenderers' (0) due to: Could not resolve type with token 01000275 from typeref (expected class 'System.Collections.Generic.Stack`1' in assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e') assembly:mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e type:System.Collections.Generic.Stack`1 member:(null) occurred

推荐答案

在所有项目中将xamarin.forms和xamarin.forms.maps降级到v4.1.0.778454.

Downgrade xamarin.forms and xamarin.forms.maps to v4.1.0.778454 in all projects.

我做到了,并且表现很好

I did it and worked perfectly

这篇关于更新Nuget导致未处理的异常:System.TypeLoadException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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