无法为项目计算完整的依赖关系图

时间:2013-12-10 10:41:50

标签: xamarin.ios mvvmcross

我想摆脱这条消息,因此构建时间大大减少(构建并运行正常)。 此警告显示在mtouch中。

  

警告MT3006:无法计算完整的依赖关系图   项目。这会导致构建时间变慢,因为Xamarin.iOS   无法正确检测需要重建的东西(以及不需要的东西)   要重建)。请查看以前的警告以获取更多详细信息。

测试解决方案:helloworld mvvmcross解决方案与ios项目和pcl(wp8 + monotouch + net45 + android)+仅在pcl中的Microsoft HTTP PCL包+在pcl中对HttpClient.GetStringAsync的异步调用。

完整日志:

  

警告MT3005:依赖项'System.Windows,Version = 2.0.5.0,   文化=中立,PublicKeyToken = 7cec85d7bea7798e'的大会   'Cirrious.CrossCore,Version = 1.0.0.0,Culture = neutral,   未找到PublicKeyToken = e16445fd9b451819'。请查看   项目的参考资料。

warning MT3005: The dependency 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly
     

'Cirrious.MvvmCross,Version = 1.0.0.0,Culture = neutral,   未找到PublicKeyToken = e16445fd9b451819'。请查看   项目的参考资料。

warning MT3005: The dependency 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly
     

'Cirrious.MvvmCross.Binding,Version = 1.0.0.0,Culture = neutral,   找不到PublicKeyToken = null'。请查看该项目   引用。

warning MT3005: The dependency 'System.Net.Primitives, Version=3.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of
     

程序集'Com.Catenum.Intouch.Business,Version = 1.0.0.0,   未找到Culture = neutral,PublicKeyToken = null'。请查看   项目的参考资料。

warning MT3005: The dependency 'System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of the assembly
     

'Com.Catenum.Intouch.Business,Version = 1.0.0.0,Culture = neutral,   找不到PublicKeyToken = null'。请查看该项目   引用。

warning MT3005: The dependency 'System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of
     

程序集'Com.Catenum.Intouch.Business,Version = 1.0.0.0,   未找到Culture = neutral,PublicKeyToken = null'。请查看   项目的参考资料。

warning MT3006: Could not compute a complete dependency map for the project. This will result in slower build times because
     

Xamarin.iOS无法正确检测需要重建的内容(以及什么内容)   不需要重建)。请查看以前的警告以获取更多信息   的信息。

1 个答案:

答案 0 :(得分:1)

您必须确保所有程序集仅引用Xamarin.iOS附带的BCL程序集。

例如:

warning MT3005: The dependency 'System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of the assembly 'Com.Catenum.Intouch.Business, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' was not found. Please review the project's references.

Xamarin.iOS没有System.Net.Http v1.5.0.0,它有v2.0.5.0(所有Xamarin.iOS基类库都有版本v2.0.5.0,monotouch.dll除外)本身)。解决方案是将Com.Catenum.Intouch.Business重新编译为Xamarin.iOS类库(这通常涉及创建一个新的Xamarin.iOS类库项目,并链接源文件),这将确保它包含正确的引用System.Net.Http.dll。

请注意,在Xamarin.iOS 7.0.4中,有一个(无害的)错误,在某些情况下会导致虚假的MT3005 / 3006警告。这可能是第一次警告的情况:

warning MT3005: The dependency 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly 'Cirrious.CrossCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e16445fd9b451819' was not found. Please review the project's references.

因为Xamarin.iOS确实包含具有该版本的System.Windows程序集。