We are using C# .Net Framework 4.7.2, JsonSerializer in System.Text.Json Version 6.0.2. Solution builds fine. We get a runtime error when Serializing: 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.
I confirmed that System.Runtime.CompilerServices.Unsafe Assembly Version 6.0.0 isinstalled as part of the NuGet package. And that App.config contains assembly redirect lines pointing to installed Version:
name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"
bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"
Appreciate any help on how to resolve this - why is System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1 needed at Runtime. Thanks!