Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies

こ雲淡風輕ζ 提交于 2019-12-07 18:18:26

Update the correct version of the installed version? Else install specific version 7 with nuget

Web.config:

<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.1" />.

Install nuget specified version:

Install-Package Newtonsoft.Json -Version 6.0.8

Alternative Web.Config add package:

<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />

uninstall or remove Ref and reinstall make sure you are Connected to internet just Go to Package manager Console and enter the Following command

**

Install-Package Newtonsoft.Json -Version 7.0.1

** Do enter

You could try letting NuGet update the binding redirect for you to make sure you have it exactly correct.

Open NuGet Package Manager Console and select your host project in the drop down. Then enter the Add-BindingRedirect command.

Also, double check that version 7.0.1 is the version referenced by your host project and that is the version of the dll making it to the bin directory (right click the dll, properties, details tab, file version).

Running Visual studio 2015 as administrator resolved this issue for me.

Note: My pc is connected to internet.

To solve this problem please do the following steps

Step#1

Delete Newtonsoft.Json dll from bin folder if any.

Step#2

If you are using web application project go to webconfig and remove these assembly references otherwise delete all assembly references from packageconfig etc.

Step#3 Install Newtonsoft.Json again

Install-Package Newtonsoft.Json -Version (Version Number Here)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!