burkeholland / InstaSharp

A c# wrapper for the Instagram API
Apache License 2.0
48 stars 1 forks source link

FileLoadException was unhandled by user code #50

Closed jerodev closed 10 years ago

jerodev commented 10 years ago

I have installed InstaSharp through nuget. When I try to send a request I get this error.

An exception of type 'System.IO.FileLoadException' occurred in InstaSharp.dll but was not handled in user code

Additional information: Kan bestand of assembly Newtonsoft.Json, Version=4.0.5.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040)

I have manualy installed the latest version of json.net, but this didn't help. Could you tell me how to solve this problem?

Thank you, Jerodev

felipepessoto commented 10 years ago

The latest JSON.NET updated version number. So you need to config the runtime binding (NuGet should have done it for you).

 <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>