0

I have developed a asp.net mvc4 website using VS2010 and it is running perfectly fine after publishing and hosting it to the same developer machine.

then i hosted the same on to the testing system which has only .net framework(4.5.1) and asp.net mvc4 run time installed, then it is giving a run time exception stating that

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

i checked all my references in my project but there is no Newtonsoft.Json referenced. Any help is greatly appreciated.

Please refer the screenshot enter image description here

vallabha
  • 385
  • 1
  • 12

1 Answers1

0

I guess in your web.config you have lines like

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

remove those that give errors like the json in this case and update that package from nuget :)

Neel
  • 11,625
  • 3
  • 43
  • 61