Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Jack2905's avatar
Jack2905
Explorer | Level 3
6 years ago

Latest Dropbox API with Newtonsoft.Json 12.0.3

Hi, I am using the latest Dropbox API 5.5.0 in my C# project, I have Newtonsoft.Json 12.0.3 installed (as the dependency says Newtonsoft.Json (>= 7.0.1)). When I try to get the Access Token, I receive this error

 

Could not load file or assembly 'Newtonsoft.Json, Version=6.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)

In my app config, I have this 

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

I can't downgrade my Newtonsoft.Json to version 6.0.0.0 because other packages require version 12.0.3. Is there any solution for this?

4 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    I believe you should be able to use the Dropbox library with Newtonsoft.Json 12.0.3. (I just tried and it does seem to work for me.)

     

    We did receive a report like this a few years ago, but that was apparently resolved by using a binding redirect like you already have in place.

     

    It's unclear why your error message is referencing version 6.0.0.0 though, since that version is neither supported by the Dropbox library nor installed in your project, per your description.

     

    There's a similar post here, which indicates it may help to reinstall the library.

     

  • Jack2905's avatar
    Jack2905
    Explorer | Level 3
    6 years ago

    Apparently upgrading from the old Dropbox API to the latest version didn't delete the old Newtonsoft.Json package correctly (Visual Studio bugs maybe). I deleted all the packages and re-installed, and it seemed to work.

  • omarprogrammer's avatar
    omarprogrammer
    New member | Level 2
    5 years ago

    hi,

     

      I'm having the same issue. Dropbox.api keeps asking for newtonsoft.json version=7.0.0 

      I've removed and readded the library a couple of times with the same effect

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    omarprogrammer I included a few links that may help in my previous comment. Please review those for more information.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!