无法解析令牌为0100000f的类型 [英] Could not resolve type with token 0100000f

查看:107
本文介绍了无法解析令牌为0100000f的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

xamarin形式运行ios时出现此错误.我该如何解决?

I get this error when running ios in xamarin forms. How can I resolve this?

System.TypeLoadException:无法解析令牌为0100000f的类型

System.TypeLoadException: Could not resolve type with token 0100000f

[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{

    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        global::Xamarin.Forms.Forms.Init();
        LoadApplication(new App());

        return base.FinishedLaunching(app, options);
    }
}

推荐答案

带有数字标记(而不是类型名称)的TypeLoadException通常表示运行时使用的程序集不同于编译时使用的程序集.

The TypeLoadException with a number token (instead of a type name) usually indicates that the assembly used at runtime is different than the one used at compile time.

在Xamarin.Forms案例中,这通常意味着您的解决方案中有不同的项目引用了不同版本的Xamarin.Forms

In the Xamarin.Forms case, that usually means you have different projects in your solution referencing different versions of Xamarin.Forms

确保所有项目的版本都对齐,并且周围没有陈旧的项目(执行git clean -xfd或删除packages文件夹,还原nuget,并确保只有一个XF版本从nuget.org提取)

make sure all of your projects are aligned in version, and that you do not have stale ones lying around (do a git clean -xfd, or remove the packages folder, restore the nugets, and make sure there's only one XF version pulled from nuget.org)

这篇关于无法解析令牌为0100000f的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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