Could not load file or assembly 'System.Memory, Version=4.0.1.1?

637 Views Asked by At

How to fix this error?

System.TypeInitializationException: The type initializer for 'ServiceStack.Text.JsConfig' threw an
                   exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Memory,
                   Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The
                   system cannot find the file specified.

Currently, I have System.Memory v4.5.4 installed in my project, so I have tried adding binding redirect in the config files

<dependentAssembly>
        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.5.4.0" newVersion="4.0.1.1" />
      </dependentAssembly>

But still I'm getting the same error. Any solution to resolve this error?

0

There are 0 best solutions below