I am modifying System.Text.Json to expose public APIs using the in modifier to support feature https://github.com/dotnet/corefx/issues/34372
APICompat is failing with several errors like this:
error : ParameterModifiersCannotChange : Custom modifiers on parameter 'reader' on method 'System.Text.Json.Serialization.JsonTypeSerializer<TType>.OnDeserialized(TType, System.Text.Json.Serialization.JsonClassInfo<TType>, System.Text.Json.Utf8JsonReader, System.Text.Json.Serialization.JsonSerializerOptions, System.Collections.Generic.IDictionary<System.String, System.Object>)' are 'System.Runtime.InteropServices.InAttribute' in the implementation but 'System.Runtime.InteropServices.InAttribute' in the contract. [D:\git\corefx2\src\System.Text.Json\src\System.Text.Json.csproj]
From looking at the IL, the ref's in modifier attribute looks like this:
[System.Runtime]System.Runtime.InteropServices.InAttribute
while the implementation IL looks likes this:
[System.Private.CoreLib]System.Runtime.InteropServices.InAttribute
Which is causing ApiCompat to fail here
I am modifying System.Text.Json to expose public APIs using the
inmodifier to support feature https://github.com/dotnet/corefx/issues/34372APICompat is failing with several errors like this:
From looking at the IL, the ref's
inmodifier attribute looks like this:[System.Runtime]System.Runtime.InteropServices.InAttributewhile the implementation IL looks likes this:
[System.Private.CoreLib]System.Runtime.InteropServices.InAttributeWhich is causing ApiCompat to fail here