This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Description
I'm hitting a MissingMethodException in the ReadOnlyMemory<T> class when using a HttpClient. I suspect this might be a case of mismatching dependencies / the API change for Span/Memory that hasn't completely solidified yet. Is there a workaround for this or will it resolve itself when the dependencies get in sync?
System.MissingMethodException: Method not found: 'System.Buffers.MemoryHandle System.ReadOnlyMemory`1<Byte>.Retain(Boolean)'.
at test!<BaseAddress>+0x521d1f
at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowMissingMethodException(ExceptionStringID, String) + 0x5
at System.Net.Security.SslStreamPal.EncryptMessage(SafeDeleteContext, ReadOnlyMemory`1, Int32, Int32, Byte[]&, Int32&) + 0x11
at System.Net.Security.SecureChannel.Encrypt(ReadOnlyMemory`1, Byte[]&, Int32&) + 0xeb
at System.Net.Security.SslStreamInternal.WriteSingleChunk[TWriteAdapter](TWriteAdapter, ReadOnlyMemory`1) + 0x193
at System.Net.Security.SslStreamInternal.WriteAsyncInternal[TWriteAdapter](TWriteAdapter, ReadOnlyMemory`1) + 0x13b
at System.Net.Security.SslStream.WriteAsync(ReadOnlyMemory`1, CancellationToken) + 0xbc
at System.Net.Http.HttpConnection.WriteToStreamAsync(ReadOnlyMemory`1) + 0x17c
at System.Net.Http.HttpConnection.FlushAsync() + 0xa7
at System.Net.Http.HttpConnection.<SendAsyncCore>d__59.MoveNext() + 0x35ee
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x30
at System.Net.Http.HttpConnectionPool.<SendWithRetryAsync>d__36.MoveNext() + 0x3e4
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x30
at test!<BaseAddress>+0x5036f2
at System.Net.Http.RedirectHandler.<SendAsync>d__4.MoveNext() + 0x13c
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x30
at test!<BaseAddress>+0x5036f2
at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__62.MoveNext() + 0x42f