Could not AOT the assembly System.ComponentModel.D

2019-03-03 22:00发布

问题:

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 

I uninstalled Xamarin. Deleted all the files and install again and I have the same error.

Important note : Incremental builds is disabled

Am I the only one to have this error? Does anyone know how to solve this?

Thanks!

回答1:

I managed to solve this by reinstalling an older version (27 Jan 2017) on both my pc and mac.

I uninstall Xamarin on my mac with the provided script. You might need to sudo chmod 755 yourFile before launching the script.

On my pc, I removed Xamarin from Tools > Extensions and Updates (search xamarin and uninstall).

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).

Now it work fine :)