-
Notifications
You must be signed in to change notification settings - Fork 533
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
Android app build fails when referencing package (e.g. Entity Framework Core 2.1) that depends on newer System.Memory #1769
Comments
FWIW, earlier I had filed a similar issue for Xamarin.iOS: iOS app build fails when referencing package (e.g. Entity Framework Core 2.1) that depends on newer System.Memory. |
In 15.7.3 we added a facade for new System.Memory. That should fix this issue. See the following PR: You can additionally use the Jenkins 15.7 build for a current workaround: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-builds-d15-7/ Note: 15.7.3 just went live. Feel free to update and try it out. |
@cwrea I can confirm that your sample project compiles on 15.7.3. Please let me know if you encounter the same. |
@JonDouglas it seems that https://github.com/dotnet/corefx/issues/29847 is being considered for patch .NET Core 2.1.1 with the purpose of addressing issue with System.Memory on Xamarin. Just to be sure, is that independent of #1509? Are these changes being coordinated? |
@divega I believe the difference is that #1509 adds the facade assemblies that will start being "ignored" once Mono removes the respective placeholders described in https://github.com/dotnet/corefx/issues/29847 I will defer to @jonpryor to correct me and answer the question on upstream coordination. |
@JonDouglas I just updated to 15.7.3 and re-tested the sample project. I can also confirm it is working now. Thank you! (FWIW, the similar iOS issue I opened still needs its own fix. 15.7.3 didn't change the Xamarin.iOS behaviour.) |
I'm closing this issue based on confirmation from @cwrea. Please feel free to open a new issue if anything comes up. |
I downloaded and compiled the sample : AndroidEFCore21Soln.zip using (PC) vs 2017 v15.8.4, Microsoft.EntityFrameworkCoe.Sqlite v2.1.3, Xamarin.Android.Support.Design v27.0.2.1. I got the following error: |
It seems that
I believe this is a separate issue from this this thread. Can you file a new issue in our repo? Thanks! |
You are correct. Your solution worked. I had previously tried this but was not able to locate system.buffers because I probably misspelled it. |
Steps to Reproduce
Download, extract, and load the sample solution in Visual Studio 15.7.2.
AndroidEFCore21Soln.zip
Build and run the project.
Expected Behavior
The project should build and run.
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 trying to link the app with v4.0.1.0 of theSystem.Memory
assembly.The previous release of EF Core, v2.0.3, could be included in a Xamarin.Android 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, the project builds and the app runs as expected.Version Information
Build Logs
Log File
adb logcat
output is not applicable as the app didn't even build.Example Project
AndroidEFCore21Soln.zip
The text was updated successfully, but these errors were encountered: