-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Milestone
Description
We started seeing this here: dotnet/android#6986
With a dotnet/linker diff of: 04c49c9...b9c9da2
A unit test using HTTP fails with:
System.Net.WebException : net_webclient
----> System.InvalidProgramException : Invalid IL code in System.Net.HttpWebRequest:AddCacheControlHeaders (System.Net.Http.HttpRequestMessage): IL_0202: unused5
Stack trace
at System.NetTests.SslTest.SslWithinTasksShouldWork()
at System.Reflection.RuntimeMethodInfo.InvokeNonEmitUnsafe(Object , IntPtr* , Span`1 , BindingFlags )
--InvalidProgramException
at System.Net.HttpWebRequest.SendRequest(Boolean )
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult )
at System.Net.WebClient.GetWebResponse(WebRequest , IAsyncResult )
at System.Net.WebClient.GetWebResponseTaskAsync(WebRequest )
at System.Net.WebClient.DownloadBitsAsync(WebRequest , Stream , AsyncOperation , Action`3 )
It fails regardless if AOT is used.
ILSpy shows that IL_0202 might be after this method entirely?
Here are the .NET assemblies from this app:
