79374195

Date: 2025-01-21 11:28:37
Score: 2.5
Natty:
Report link

I've been trying to solve this issue for 2 days now and now that I've posted the question I found a solution :$

stackoverflow.com/a/73557076/12924241 Inspired me to change the bindingRedirect to the correct version (6.0.1.0).

This is the correct App.config with binding recdirects:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <!--
        This binding redirect is needed to make anything that involves calling System.Text.Json to work.
        For some reason this is only needed in unit test projects.
      -->
      <dependentAssembly>
        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.1.0" newVersion="6.0.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Blacklisted phrase (1): days now
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: J.P.