cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Invalid version of Newtonsoft.json with Dropbox.API v4.0.30319

New member | Level 2
New member | Level 2

Hi,

 

I'm getting the following run-time error when trying to upload a file to Dropbox using the DropBox.API for .NET.

 

Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

 

The Dropbox version I'm using is v4.0.30319 and it comes installed with NewtonSoft.Json version v7.0.1 but I've upgraded my version to v10.0.3. I've checked the Dropbox.API dependencies and it is stating that it should use NewtonSoft.Json v7.0.1 or higher which it is.

 

The weird thing is that I upgraded weeks ago to 10.0.2 and never had any problems, certainly not related to not finding v7.0.1.

 

Any ideas how I can resolve this?

 

Thanks.

7 Replies 7
Highlighted

Re: Invalid version of Newtonsoft.json with Dropbox.API v4.0.30319

New member | Level 2
New member | Level 2

I managed to fix it, well thanks to StackOverflow.

 

I added the following to my app.config file in the Configuration section.

 

<runtime>

  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

    <dependentAssembly>

      <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />

      <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="10.0.0.0" />

    </dependentAssembly>

  </assemblyBinding>

 </runtime>

 

 

Hopefully, it will be of some help to others!

Highlighted

Re: Invalid version of Newtonsoft.json with Dropbox.API v4.0.30319

New member | Level 2
New member | Level 2

Thanks!

Highlighted

Re: Invalid version of Newtonsoft.json with Dropbox.API v4.0.30319

Explorer | Level 4

i used your step but still now i get the same error ..... i try to upgrade the newtonsoft version 7.0 to 9.0.

 

drop.pngdrop1.png

 

 

help me to solve this issue......

Highlighted

Re: Invalid version of Newtonsoft.json with Dropbox.API v4.0.30319

Dropboxer
Dropboxer

@MathanKumar Can you share the full error/output you're getting?

Highlighted

Re: Invalid version of Newtonsoft.json with Dropbox.API v4.0.30319

Explorer | Level 4

ff.png

Highlighted

Re: Invalid version of Newtonsoft.json with Dropbox.API v4.0.30319

Dropboxer
Dropboxer
Thanks! We'll look into it.
Highlighted

Re: Invalid version of Newtonsoft.json with Dropbox.API v4.0.30319

Dropboxer
Dropboxer

@MathanKumar Unfortunately, it's not clear what the issue may be, and it's likely related to the particular project configuration. If you're still seeing this, please share a sample project that reproduces the issue so we can reproduce it and investigate. Thanks!

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?