-1

I am using a TwitchLib reference and uses Newtonsoft.Json 7.0.0. Every time I got to the page that calls Twitch lab I get the following error.

Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'

I have Newtonsoft.Json, Version=9.0.0.1 installed in my project.

I have added this to my config to try and resolve the issue.

  <dependentAssembly>
    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
  </dependentAssembly>

How can I resolve this issue?

Bad Dub
  • 1,503
  • 2
  • 22
  • 52

2 Answers2

1

In the Nuget package manager console:

Uninstall-Package Newtonsoft.Json -Force

Install-Package Newtonsoft.Json -Version 6.0.0.0

See here: How to install an older version of package via NuGet?

Community
  • 1
  • 1
longestwayround
  • 979
  • 9
  • 13
-1

Changed the reference newVersion="7.0.0.0" to newVersion="9.0.0.0" and it seems to have resolved the problem.

Bad Dub
  • 1,503
  • 2
  • 22
  • 52