问题描述
我已将 Xamarin 更新到最新版本(Visual Studio 上的版本为 4.3,XCode 8.2.1 (8C1002) 和 Mac 上的 Xamarin 已更新).两天前(更新之前),我能够在设备(iOS 10.2)上进行测试.现在我只能在模拟器上测试.当我在设备上测试时,出现以下错误:
I have updated Xamarin to the latest version (version 4.3 on Visual studio, XCode 8.2.1 (8C1002) and Xamarin on Mac is updated).Two days ago (before the update), I was able to test on device (iOS 10.2). Now I can test only on simulator. When I test on device I get the following error:
Could not AOT the assembly
'/Users/daniel/Library/Caches/Xamarin/mtbs/builds/MyApp.Forms.iOS/1af4f6c4fd45446e99d1f7cc7969a4fd/obj/iPhone/Debug/mtouch-cache/64/Build/System.ComponentModel.DataAnnotations.dll'
MyApp.Forms.iOS
我卸载了 Xamarin.删除所有文件并重新安装,我有同样的错误.
I uninstalled Xamarin. Deleted all the files and install again and I have the same error.
重要说明:增量构建已禁用
我是唯一一个遇到这个错误的人吗?有谁知道如何解决这个问题?
Am I the only one to have this error? Does anyone know how to solve this?
谢谢!
推荐答案
我设法通过在我的 PC 和 Mac 上重新安装旧版本(2017 年 1 月 27 日)来解决此问题.
I managed to solve this by reinstalling an older version (27 Jan 2017) on both my pc and mac.
我使用 提供的脚本在我的 mac 上卸载 Xamarin.在启动脚本之前,您可能需要 sudo chmod 755 yourFile
.
I uninstall Xamarin on my mac with the provided script. You might need to sudo chmod 755 yourFile
before launching the script.
在我的电脑上,我从工具">扩展和更新"中删除了 Xamarin(搜索 xamarin 并卸载).
On my pc, I removed Xamarin from Tools > Extensions and Updates (search xamarin and uninstall).
然后您可以使用旧设置开始新安装.出于我的考虑,我登录了 Xamarin.com 并在我的仪表板中下载了先前版本的 Xamarin(截至 2017 年 1 月 27 日).
Then you can start a new installation with the old setups. For my concerns, I logged in Xamarin.com and in my dashboard, I could download the previous version of Xamarin (as of 27 Jan 2017).
现在它工作正常:)
这篇关于无法 AOT 程序集 System.ComponentModel.DataAnnotations.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!