-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Xamarin.IOs Operation is not supported on this platform #35988
Comments
I'have the same exception. |
I also have this. It's a major problem for us. |
I have the same exception. |
It seems like xamarin.ios is picking the netstandard2.1 version of microsoft.extensions.dependencyinjection 3.1.x. 3.0.x does not support netstandard2.1, and when the targetFramework is netstandard2.0, the ILEmitBackend is not used. Maybe IL_EMIT should not be set for netstandard2.1, just like for netstandard2.0 ? |
Triage: It should be possible to detect this with the runtime capability API and have DI switch from IL Emit mode to Reflection when IL Emit is not available. Marking for transfer to runtime for 5.0 consideration. |
I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label. |
The reason we are hitting in Xamarin is because from Lines 63 to 75 in 855e296
we are hitting line 64. IsDynamicCodeCompiled is only available in netcoreapp. When Xamarin moves to .NET Core runtime, this issue would get fixed. |
…crash Due to an [issue](dotnet/runtime#35988) at xamarin's end (which *should* have been fixed via [this pr](dotnet/macios#8615) but still fails on latest preview release) we can't support this just yet.
The issue seems to be gone when using version 3.1.11 of 'Microsoft.Extensions.DependencyInjection' |
Is this issue still relevant? |
The issue is gone, but if we don't know what was causing it and what has changed that fixed it, it'll come back. |
This issue is fixed if you use the latest bits.
Older versions of Xamarin forms use the Lines 63 to 74 in 24900f8
it checks Closing. If you see this again with the latest versions, feel free to re-open. |
Describe the bug
I can't really describe why the bug is occuring Because I don't understand where in the code exactly it occurs. But I try my best. So I have a Xamarin.IOs app with different Pages. When I navigate to a page that creates a couple of ViewModels (that are using Dependency Injection) then navigate back and then navigate to this page again, then an exception is raised in an unobserved task that seems to be outside my own code. I can't debug to the exception only after it happened the UnobservedException call back is triggered and there i could log the exception. It looks like this:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No Exception is thrown (it works on 3.0.x)
The text was updated successfully, but these errors were encountered: