1

I have a Xamarin Forms project with an iOS and UWP project. When building the iOS project I get the following error:

Could not AOT the assembly '/Users/xxx/Library/Caches/Xamarin/mtbs/builds/xxx.iOS/xxx/obj/iPhone/Debug/mtouch-cache/3-Build/System.Configuration.dll'

The solution also contains a .net-standard 2.0 class library which the Xamarin Forms project references. This class library contains the following Nuget Packages:

  • EntityFrameworkCore
  • EntityFrameworkCore.Relational
  • EntityFrameworkCore.SqlServer
  • EntityFrameworkCore.Tools
  • Newtonsoft.Json
  • System.ComponentModel.Annotations
  • MyNugetPackage (Custom Package which has the dependencies you see below) MyNugetPackageDependencies

My Xamarin Forms Project has the following Nuget Packages:

  • SimpleInjector
  • Xamarin.Forms (4.4.0)
  • Xamarin Essentials (1.4)

I have read the following post but they it doesn't resolve my issue:

  • Post 1 - I'm not using MonoPInvokeCallbackAttribute
  • Post 2 - I'm not using linking (Set to Don't Link)

I have also looked at all the Nuget Packages but can't see any that depend on System.Configuration. Turning on verbose mode (-v -v -v -v) does not add any more information regarding System.Configuration. How can I get my project to build? If you need any more information feel free to ask.

Ryan Gaudion
  • 695
  • 1
  • 8
  • 22
  • Make sure that the version of your IDE is up to date . And you could delete the folder `bin` and `obj` both in iOS and share project .Then clean and rebuild it . – Lucas Zhang Feb 26 '20 at 02:18
  • @LucasZhang-MSFT - Visual Studio Version is 16.4.5 and a full clean and rebuild did not help. – Ryan Gaudion Feb 28 '20 at 11:56
  • You could report the issue to official forum: Open your IDE->Help->send feedback->report a problem.. – Lucas Zhang Mar 05 '20 at 06:41
  • @RyanGaudion did you find a solution to this problem? I am seeing exactly the same isssue in almost identical circumstances (and, as you said, it only affects iOS). – Tim Coulter Jul 20 '20 at 17:10
  • Hi Tim, unfortunately I did not find a solution other than using entity Framework Core 2 instead of 3 (which only worked occasionally). I instead opted to learn ASP.net Core and create a Web API for the application – Ryan Gaudion Jul 20 '20 at 17:13

0 Answers0