Skip to content
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

Linking on Xamarin IOS apparently removes some EF Core 2.0 features #3441

Closed
Kortdag opened this issue Feb 9, 2018 · 5 comments
Closed

Linking on Xamarin IOS apparently removes some EF Core 2.0 features #3441

Kortdag opened this issue Feb 9, 2018 · 5 comments
Labels
iOS Issues affecting iOS need-info Waiting for more information before the bug can be investigated support The issue is related to support

Comments

@Kortdag
Copy link

Kortdag commented Feb 9, 2018

Steps to Reproduce

Run on a real device. Haven´t testet on emulator.
Fix Info.plist certificates to you own

  1. Run sample project with Linker behavior "Link SDK frameworks Only". And deploy
  2. Run sample project with Linker behavior "Dont link"
  3. var test = context.Blogs.Include(x => x.Posts).ToList(); in app delegate fails i scenario 1) with [Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions] but works without linking

LinkEFSample.zip

@mandel-macaque
Copy link
Member

Hello,

I tried to test the supplied application but it does not build since the platform of the EF dependency lib does not match with the Xamarin.iOS runtime:

screen shot 2018-02-09 at 12 55 32

Can you please fix the project and resubmit. Nevertheless, it is important to note that it might be the case that the linker is removing code that it believes is not used. You can configure the linker to NOT remove certain classes/methods/properties as indicated in the docs

But if you can provide a compiling test app I will take a look to pinpoint the issue and if needed provide you with a config xml for your case.

@mandel-macaque mandel-macaque added the need-info Waiting for more information before the bug can be investigated label Feb 9, 2018
@Kortdag
Copy link
Author

Kortdag commented Feb 9, 2018 via email

@spouliot
Copy link
Contributor

spouliot commented Feb 9, 2018

might be a duplicate of #3394

@Kortdag
Copy link
Author

Kortdag commented Feb 9, 2018 via email

@spouliot
Copy link
Contributor

But I guess the conclusion is that the only place to fix this in a robust way is if its done in the Core EF framework??

@Kortdag Yes, they are the only people who knows what's used thru reflection (to preserve them) and that list can differ across versions (which we would not be able to deal with).

If the previous workaround is not complete enough then please update your test case, re-open the issue and we'll have a look.

@rolfbjarne rolfbjarne added iOS Issues affecting iOS support The issue is related to support labels Sep 4, 2018
@ghost ghost locked as resolved and limited conversation to collaborators May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Issues affecting iOS need-info Waiting for more information before the bug can be investigated support The issue is related to support
Projects
None yet
Development

No branches or pull requests

4 participants