Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly 'Newtonsoft.Json.Net35 [closed]

Tags:

json

c#

.net

My code throws this runtime exception

{"Could not load file or assembly 'Newtonsoft.Json.Net35, Version=4.0.2.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.":"Newtonsoft.Json.Net35, Version=4.0.2.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed"}

But I have installed Newtonsoft.Json using NuGet

How can I fix this?

like image 711
Elad Benda Avatar asked Mar 14 '13 14:03

Elad Benda


1 Answers

A few options:

  • Make sure nuget updated your packages.config file and packagerestore is turned on. These can cause issues when using a VCS and a user doesn't properly commit changes back.
  • Try restarting VS, I have found that after pulling down from a VCS, the references don't always update properly
  • Open nuget, remove the package and reinstall it.
like image 132
Pete Garafano Avatar answered Oct 22 '22 12:10

Pete Garafano