I'm working on Xamarin.ios application with Microsoft.EntityframeworkCore.Sqlite version 2.1.1 with Xamarin.forms .NetStandard 2.0 version. I'm unable to build the application on iPhone, getting the below error:
MTOUCH: Error MT3001: Could not AOT the assembly 'project_name/iOS/obj/iPhone/Debug/device-builds/iphone10.2-11.0.2/mtouch-cache/Build/Microsoft.EntityFrameworkCore.dll' (MT3001) (project_name.iOS)
Could any one please help me to get through the error, I tried to downgrade the entityframework version to 2.0.0 and also downgrade the Microsoft.extension.* version to 2.0.0.
Linker behavior : Don't Link/ Link SDK only SDK Version: 11.0
I had a similar error when implementing
EntityFrameworkCorein the project I am working on. The solution for me was to add a file to my iOS project, and have these contents. Also, I am runningMicrosoft.EntityFrameworkCore.Sqliteversion 2.0.2 currently with no problems.You will also need to set that files
Build Actionto LinkDescription. Also, you don't need to copy that file to the output directory. It is only used during the build.In your project settings for the
iOSproject, you will need to put --xml=${ProjectDir}/LinkDescription.xml in theAdditional mtouch argumentssection iniOS Build.Hope this helps!