-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS app build fails when referencing package (e.g. Entity Framework Core 2.1) that depends on newer System.Memory #4168
Comments
I am able to still reproduce this with the sample on 15.7.3. I see it may be resolved for XA (see dotnet/android#1769) already. @spouliot I don't fully understand the problem here, but is there something done for XA with the facades that need to be done for XI too? |
@therealjohn I confirmed the similar issue is resolved for Xamarin.Android with 15.7.3. I can also confirm I'm still seeing it as an issue on Xamarin.iOS with 15.7.3. |
I am hitting this in iOS when referencing Microsoft.Extensions.DependencyInjection. Are there any workarounds until this gets fixed? |
I was able to implement a workaround. I downgraden all package references for “Microsoft.extensions.*” to Version 2.0.0. In csproj file and PackageS.config |
@leonvandebroek this workaounrd does not appear to address my problem when attempting to run an iOS app on a device. I can compile, but get a "could not AOT the assembly..." error when I attempt to deploy. Does anyone know if this is on the radar to be addressed in 15.7.4? I am hoping that EF Core 2.1 fixes a problem on iOS related to tables with more than 14 columns and/or nullable data types., but at this point I can't even get the app running on iOS to test. |
Confirming @cfdelaune's comment. Downgrading package references for I tried on the sample project for this issue. In particular, I downgraded
... however, when targeting a physical device, C# compilation succeeds, but the build fails during AOT with an assertion failure, "aot-compiler.c:3118, condition `t->num_mods == 0' not met":
|
FWIW, this issue I opened is not just impacting users attempting to upgrade to Entity Framework Core 2.1, but is also a problem for users of SignalR on Xamarin: aspnet/SignalR #1886 - Xamarin support tracking issue. Quoting @davidfowl:
|
I tried another potential workaround, but still no luck. The following claim was made in a comment on the .NET Standard issue at dotnet/standard#682 (comment):
(Here's my own follow-up comment, for what it's worth.) Anyway, I thought: Perhaps if I remove the Xamarin.iOS.framework copy of the broken System.Memory.dll facade, and then manually reference either netstandard1.1/netstandard2.0 versions of System.Memory and System.Buffers (required for the netstandard targets) in the iOS project, then maybe it will work. But no success. With this attempted workaround, I still end up with the same "AOT Compilation exited with code 134" messages as when trying to downgrade Microsoft.Extensions.Primitives to 2.0.0. |
I just updated to latest nuget for XF 3.x and still get the error when (trying to) deploying to iOS real device. DOES run on iOS simulator. I also need to stay on .net Core 2.1 for my EF and other bits since they helped resolve other problems. Anyone know the best way to ensure this is getting the attention it needs by the right folks? Seems like the problem is in System.Memory for Microsoft.Extensions.Primitives. At least it is for me. System.MemoryExtensions::AsSpan(System.String,System.Int32,System.Int32)', referenced from the method 'System.ReadOnlySpan`1<System.Char> Microsoft.Extensions.Primitives.StringSegment::AsSpan()' in 'System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. LitFit.App.XF.iOS |
I reported via Visual Studio problem reporting under "System.MemoryExtensions related Build failure for iOS" - maybe if people "thumbs up" we can get more MS attention on problem? |
The issue is know and is fixed in the latest patch which will be released very soon. |
Thanks @davidfowl. Fyi, I just again updating to very latest Microsoft.EntityFrameworkCore 2.11 nugets - but did not help (and also regressed Android build to a new compile-time error re System.Buffers). Which package should include the patch that should fix the problem? (And thanks again) |
@dgerding The patch may be in reference to an upcoming maintenance release of Visual Studio + Xamarin, and not a NuGet package. |
@davidfowl. Do you mean version 15.7.4 of Visual Studio? |
This is solve with VS2017 version 15.7.4 by updating EFCore v2.1.1 and all Microsoft.Extensions.* v2.1.1 UPDATE : I can only compile without error in Simulator configuration |
I can confirm that this is NOT working on a physical iOS device using EFCore 2.1.1 and VS 15.7.4. |
Potentially related: aspnet/Announcements#305:
In addition to new packages for SignalR, it also mentions Visual Studio 15.8 Preview 3 with Xamarin.iOS 11.14.0.4 as needed to fully resolve the blocking issues. FWIW, an issue previously reported with SignalR on Xamarin.iOS also related to Crossing my fingers this issue also gets resolved by VS 15.8 Preview 3. |
@smitpatel I think you tested EF Core 2.1 with the preview build. Did it all work? |
I've the same issue when i use EF 2.0.3 and SignalR 1.0.1 (System.ReadOnlySpan1<System.Char> ) on Xamarin.IOS |
Hi all (especially @cwrea :) ), Yes, 15.8 P3 does update to a new Xamarin.iOS build, which VS for Windows did for me. Nice. Unfortunately, I still can't get a build to deploy to real device. Think it's unrelated but thought people would want to know that 15.8 p3 does seem to fix the problem. I'll know for sure when I can deploy to a real device ! Dave G Hooray! |
@cwrea Also, since my project also targets Android with EF2.1.1 I wanted to report that I don't get any System.Memory related errors on 15.8 Pre3 using latest release nugets. So it might have fixed the related issue, too. |
:( "Premature Hooray". I couldn't get project to build to real device on my own system but wasn't getting memory related error. Just "app halted"... however, on an AppCenter hosted iOS build I see something familiar: (_CompileToNative target) -> |
Still nothing ? |
I no longer get the build error after installing the latest .NET Core version (2.1.2). I believe this PR fixed the issue. Could someone else please confirm? |
@therealjohn - That is correct. We have made fix to stop having build error in this case. If you are encountering any other error once you are past that, please file an issue in appropriate place so we can make things better. |
Hi
I am glad to hear that there is a resolution however as a consequence of some update by either xamarin M’soft or apple at the weekend my entire environment has turned to molasses and also rejects my mobile devices …. So I can’t test anything until I rebuild my dev environment
Best Regards
Trevor Smith
NanoTech Software Ltd
01603 851 707 (Direct)
07535 447394 (mobile)
www.nanotechsoftware.co.uk <http://www.nanotechsoftware.co.uk/>
This e-mail, including any attachments, is intended for the above named recipient(s) only and may be confidential. If it has come to you in error you must take no action based on it, nor must you copy it or use it for any other purposes, or disclose the content of the e-mail to any other person, or store or copy the information in any medium. If you have received this email in error, please notify info@nanotechsoftware.co.uk <mailto:info@nanotechsoftware.co.uk> immediately quoting the name of the sender and the addressee then delete it from your system.
Any views or opinions expressed within this email are those of the author and do not necessarily represent those of nanoTech Software Ltd.
… On 24 Jul 2018, at 17:01, Smit Patel ***@***.*** ***@***.***>> wrote:
@therealjohn <https://github.com/therealjohn> - That is correct. We have made fix to stop having build error in this case. If you are encountering any other error once you are past that, please file an issue in appropriate place so we can make things better.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#4168 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AmGJuX40BhgnYSgl_9pXWPLXeOjE0uShks5uJ0TygaJpZM4UVepc>.
|
I'm running into this problem trying to build for a real ios device. Has there been any progress on this problem? Visual Studio Community 2017 for Mac Error MT3001: Could not AOT the assembly '.../Microsoft.EntityFrameworkCore.dll' (MT3001) |
I just gave this a shot using the latest stable bits (VS 2017 [15.7.6], NET STANDARD 2.0.3, EF 2.1.1, etc.) and run into the same issue as before. Based on this thread, my hope is that these issues are resolved in VS 2017 [15.8] which I imagine will drop soon. I expect to be able to test as soon as it is released and will report back. If anyone monitoring this thread has more information please let me know! Thanks. |
The build works fine for me in VS 15.8. I'm now able (after months...) to build on iOS successfully ;-). clang: error: linker command failed with exit code 1 (use -v to see invocation) |
@cfdelaune thanks for your response. You think I will recive a Linker error at compile time because of your described problem? I think your described problem will cause a runtime exception. You have an idea why carbon framework is not founded when I build to a real device? |
I've tried the original test project [1], and while as-is it failed to build, it succeeded (both for device and simulator) after I upgraded the I did not see any of the MT5215 warnings reported in #4168 (comment); so if you see these (or any other problem for that matter), please file a new issue with a test project. [1] With the current stable versions of Xamarin.iOS (11.14.0.14) & Mono (5.12.0.301)
|
When will this issue be fixed? I need it so badly to be fixed! |
@DoubleDBE to the best of my knowledge, this issue was already fixed. If you are seeing similar symptoms, consider creating a new issue and make sure you include the full details about how to repro, versions involved, and the exact error. |
@divega @DoubleDBE I have an IOS Application using version 2.2.4 which is working fine. |
Yes … This issue was resolved a while back
Best Regards
Trevor Smith
NanoTech Software Ltd
01603 851 707 (Direct)
07535 447394 (mobile)
www.nanotechsoftware.co.uk <http://www.nanotechsoftware.co.uk/>
This e-mail, including any attachments, is intended for the above named recipient(s) only and may be confidential. If it has come to you in error you must take no action based on it, nor must you copy it or use it for any other purposes, or disclose the content of the e-mail to any other person, or store or copy the information in any medium. If you have received this email in error, please notify info@nanotechsoftware.co.uk <mailto:info@nanotechsoftware.co.uk> immediately quoting the name of the sender and the addressee then delete it from your system.
Any views or opinions expressed within this email are those of the author and do not necessarily represent those of nanoTech Software Ltd.
… On 23 Jun 2019, at 14:09, Nino Padrutt ***@***.***> wrote:
@divega <https://github.com/divega> @DoubleDBE <https://github.com/DoubleDBE> I have an IOS Application using version 2.2.4 which is working fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#4168?email_source=notifications&email_token=AJQYTOOTMQYVSDZNSOSXSALP35YZ3A5CNFSM4FCV5JOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYK6DIQ#issuecomment-504750498>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJQYTONVEXQO7OBYQ6LE4QTP35YZ3ANCNFSM4FCV5JOA>.
|
It's working fine on VS 2017. However on VS 2019 i'm getting this error #mysql-net/MySqlConnector#644 The moment Xamarin.iOS SDK v12.10.x is installed on my mac, i'm getting this error. |
We are using vs 2019 . Latest versions of everything but EF.Core 2.2.4 … all works fine
Best Regards
Trevor Smith
NanoTech Software Ltd
01603 851 707 (Direct)
07535 447394 (mobile)
www.nanotechsoftware.co.uk <http://www.nanotechsoftware.co.uk/>
This e-mail, including any attachments, is intended for the above named recipient(s) only and may be confidential. If it has come to you in error you must take no action based on it, nor must you copy it or use it for any other purposes, or disclose the content of the e-mail to any other person, or store or copy the information in any medium. If you have received this email in error, please notify info@nanotechsoftware.co.uk <mailto:info@nanotechsoftware.co.uk> immediately quoting the name of the sender and the addressee then delete it from your system.
Any views or opinions expressed within this email are those of the author and do not necessarily represent those of nanoTech Software Ltd.
… On 23 Jun 2019, at 14:14, DoubleDBE ***@***.***> wrote:
It's working fine on VS 2017. However on VS 2019 i'm getting this error #mysql-net/MySqlConnector#644 <mysql-net/MySqlConnector#644>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#4168?email_source=notifications&email_token=AJQYTOLANWHZMV3PH6YTP6LP35ZJZA5CNFSM4FCV5JOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYK6HCI#issuecomment-504750985>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJQYTOONFIFBQKK5A4XN7STP35ZJZANCNFSM4FCV5JOA>.
|
I've edited my comment. |
Steps to Reproduce
Download, extract, and load the sample solution in Visual Studio 15.7.2.
iOSEFCore21Soln.zip
Build and run the project, targeting either iPhone or iPhone Simulator.
Expected Behavior
The project should build and run, writing some lines to debug output indicating that Entity Framework Core has created a database from the simple model included in the project.
Actual Behavior
The project won't build. The build fails with the following error:
EF Core v2.1 or one of its dependencies in turn depends on package
System.Memory
v4.5.0, while the build appears to be linking the app with v4.0.1.0 of theSystem.Memory
assembly included in Xamarin.iOS.The previous release of EF Core, v2.0.3, could be included in a Xamarin.iOS project without causing this problem. If you change the sample solution to refer to package
Microsoft.EntityFrameworkCore.Sqlite
v2.0.3 instead of v2.1, ithe project builds and the app runs as expected.Environment
Build Logs
Example Project (If Possible)
iOSEFCore21Soln.zip
The text was updated successfully, but these errors were encountered: