Closed
Description
In a meastro bump for dotnet/dotnet from last week this is happening in our tests:
System.BadImageFormatException: Invalid usage of UnsafeAccessorAttribute.
at System.Net.Http.HttpClientHandler.<CreateNativeHandler>g__CallNative|124_0()
at System.Net.Http.HttpClientHandler.CreateNativeHandler()
at System.Net.Http.HttpClientHandler..ctor()
at System.Net.Http.HttpClient..ctor()
I'm guessing it's because if this change: da80937 (CC @jkoritzinsky)
This is the code in question:
I think maybe the CallNative
method should be this instead?
static extern HttpMessageHandler CallNative([UnsafeAccessorType(NativeHandlerType)] object type);