Xamarin Studio(Monotouch)中的错误MT2002 [英] Error MT2002 in xamarin studio (Monotouch)

查看:57
本文介绍了Xamarin Studio(Monotouch)中的错误MT2002的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天

我正在为我的iOS应用程序使用Xamarin Studio 4.0.12(内部版本3),但是由于错误,我无法在设备或iOS模拟器上构建应用程序:

I'm using Xamarin Studio 4.0.12 (build 3) for my iOS app , but I unable to build app to device or iOS simulator due to an error :

错误MT2002:无法解决来自"monotouch,Version = 0.0.0.0,Culture = neutral,PublicKeyToken = 84e04ff9cfb79065"的"System.Void MonoTouch.Foundation.FieldAttribute ::.ctor(System.String,System.String)"引用

Error MT2002: Failed to resolve "System.Void MonoTouch.Foundation.FieldAttribute::.ctor(System.String,System.String)" reference from "monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065

当我将链接器行为"更改为仅链接SDK程序集"时,会发生此错误,但是如果我更改为不链接",则所有操作都很好,但是应用程序大小将从23mb变为60mb.

When I change ' Linker Behaviour ' to ' Link SDK assembly only ' that error occur , but if I change to ' Don't Link ' every thing work great , but app size will change from 23mb to 60mb .

Thx

推荐答案

6.2.6中添加了 [Field] 属性(

The [Field] attribute was added in 6.2.6 (see API diff from release notes).

这意味着您正在使用由6.2.6+编译的程序集二进制文件(例如绑定),并且它与Xamarin.iOS的早期版本不兼容.

This means you're using an assembly binary (e.g. bindings) that was compiled with 6.2.6+ and it not compatible with earlier versions of Xamarin.iOS.

您可以尝试获取该程序集的旧版本,也可以更新到Xamarin.iOS的6.2.6(或更新的版本).

You can either try to get an older version of that assembly or update to 6.2.6 (or a more recent version) of Xamarin.iOS.

这篇关于Xamarin Studio(Monotouch)中的错误MT2002的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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