Я создаю Xamarin.Android в режиме выпуска, используя автоматическую сборку с использованием Azure DevOps
У меня включен AOT с включенным LLVM (я знаю, что ранее AOT был «Экспериментальным», но я думаю, что он не готов к производству)
Я могу собрать свой проект локально, но при использовании MSBuild я получаю следующие ошибки:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: System.Data.DataSetExtensions.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: Xamarin.Forms.GoogleMaps.Android.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: CarouselView.FormsPlugin.Android.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: Syncfusion.Core.XForms.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: Plugin.Messaging.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: Syncfusion.DocIORenderer.Portable.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: SQLitePCLRaw.provider.e_sqlite3.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: Syncfusion.DataSource.Portable.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: Microsoft.AppCenter.Analytics.Android.Bindings.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: Plugin.CurrentActivity.dll C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2730,3): Error XA3001: Could not AOT the assembly: SQLite-net.dll
Суть этой ошибки в следующем:
Could not AOT the assembly: AssemblyX.dll
Я тоже пытался создать размещенную виртуальную машину, и я получаю ту же ошибку.
Так где же кроется первопричина этой ошибки, это Визуальная студия? Ксамарин? Отдельные библиотеки или мой проект?
@SushiHangover Я загрузил журнал сборки здесь wetransfer.com/downloads/…, где debug был указан для MSBuild
Похоже, что это связано с этой проблемой: github.com/xamarin/xamarin-android/issues/2290





Оказалось, что это всего лишь одна сборка, вызывающая ошибку:
System.Data.DataSetExtensions.dll V4.5.0
Найдено здесь: https://www.nuget.org/packages/System.Data.DataSetExtensions/4.5.0
После рефакторинга этой библиотеки мое решение было построено нормально.
Вы можете отслеживать эту проблему здесь: https://github.com/xamarin/xamarin-android/issues/2751
Включите отладку уровня диагностики для MSBuild, очистите/перестройте и опубликуйте полную ошибку сборки AOT.