Xamarin support tracking issue
There's a bunch of work that is planned but that is also required to make SignalR work. There is an issue in System.Memory preventing it from being used in Xamarin applications. This issue is tracking the work that is being done in corefx to remedy the situation.
We also need to determine our plan for MsgPack in Xamarin. If we support it in the initial release, we need to make sure it's configured appropriately to not use Reflection.Emit.
Most of these PRs are closed, are they in a public build or can we get some access to a build that has these fixes to test out? @davidfowl
Is there an actual version that actually works? Trying to get this to work but getting system.memory error all the time.
/cc @migueldeicaza
I have the same "system.memory" issue on Xamarin Android (.NET Standard) project using AspNetCore.SignalR.Client. Is there any further update on this please? (I can make progress using UWP)
I found to get Android building, directly reference: system.memory Then to get running, copy over to debug/Android/assets at post build time: system.io.pipelines, system.threading.tasks.extensions, system.buffers, system.runtime.compilerservices.unsafe
Version="1.0.0-preview2-final" doesn't build for iOS project on VS 2017 15.6.6
Failed to resolve "System.Buffers.IBufferWriter`1" reference from "System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"
@mikaelm12 Did you get a chance to look into this yet?
@muratg I'd need access to a build with these fixes
@mikaelm12 sounds good, punting the verification out of the milestone.
@akoeplinger any more details you can give here?
With latest VS for mac 15.7 preview, the AOT compilation error goes away. https://stackoverflow.com/questions/49646078/xamrin-ios-aot-compilation-fails-from-mac-but-builds-fine-from-pc/49699385#49699385
However, on iOS, the following error remains even with rc1-final.
Failed to resolve "System.Buffers.IBufferWriter`1" reference from "System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"
We added the System.Memory.dll facade (that's why the AOT error went away) but we haven't added all the types yet. I'll find out where we're tracking that :)
It's an issue on both iOS and Android actually.
The AOT error didn't go away because I upgraded signalr (it was on preview 1), it went away because I upgraded vs 4 mac :-)
BTW, I'm lost. System.Memory 4.0.1.0 is in .Net Core 2.1. So how can it be used by Xamarin anyway?
I wrote a SOF question to get help understanding the assembly resolution going on here. If anyone here thinks he/she can help me here is the link ;-)
Also, if I change the linker behavior to "Don't link" then I get another error:
Could not AOT the assembly '/Users/francois/Library/Caches/Xamarin/mtbs/builds/AotTests.iOS/678ab06afbe35836bdafdf91a7d48f1c/obj/iPhone/Debug/mtouch-cache/Build/System.IO.Pipelines.dll'
This is strange because I thought the aot errors where caused by the new way of referencing packages and that it was solved with VS 15.7 (and indeed the previous aot error I raised was solved), as explained here.
System.Memory 4.0.1.0 is not support on mono framework 5.10 which is in 15.7. Ref https://releases.xamarin.com/release-15-7/
Supported mono version will be 5.12 or above. which are not release yet. Ref https://www.mono-project.com/docs/about-mono/releases/ Ref https://github.com/xamarin/xamarin-android/pull/1509
But why do you use version 4.0.1.0 which is in net core and not in mono when maybe you could use 4.5.0 which (I think) is net standard and already referenced as a nuget package?
Morover, if somewhere you use version 4.0.1.0, why isnt there a #if NETCOREAPP2_1 to prevent it from being compiled in the net standard version consummed by xamarin?