Skip to content

System.Text.Json.Serialization.Tests failing with FileLoadException on net48 runs #66232

Open
@elinor-fung

Description

@elinor-fung

After #65863, these two are failing on net48 runs:

  • System.Text.Json.Serialization.Tests.CacheTests.JsonSerializerOptions_ReuseConverterCaches
  • System.Text.Json.Serialization.Tests.CustomConverterTests.GetConverter_Poco_WriteThrowsNotSupportedException
Child exception:
  System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.Span`1..ctor(T[] array, Int32 start, Int32 length)
   at System.Text.Json.PooledByteBufferWriter.Dispose()
   at System.Text.Json.JsonSerializer.WriteStringUsingSerializer[TValue](TValue& value, JsonTypeInfo jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Serialize[TValue](TValue value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CustomConverterTests.<>c.<GetConverter_Poco_WriteThrowsNotSupportedException>b__321_0()

Build: https://dev.azure.com/dnceng/public/_build/results?buildId=1637814&view=ms.vss-test-web.build-test-results-tab&runId=45326006&paneView=debug&resultId=118036

cc @eiriktsarpalis @layomia

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions