Skip to content

Google.Apis version doesn't work with newer version of Newtonsoft.Json #1464

@csokmaib

Description

@csokmaib

I am using Google.Apis version 1.36.1 in a web application in .NET Framework 4.7.2 whizh works with a Newtonsoft.Json version 10.0.2. I want to include in my web application a class library in .NET Standard 2.0 which uses Newtonsoft.Json version 12.0.2, but I can't, because is an incompatibility issue between these 2 Newtonsoft version.

I wanted to upgrade the Newtonsoft.Json in web app from 10.0.2 into 12.0.2 but it says the Google.Apis doesn't support the newer version of the Newtonsoft.Json.

Any idea how can I solve this problem? Maybe Google.Apis should be do an upgrade?

Thanks in advance!

UPDATE:

I figured out what was the problem. I updated Newtonsoft from version 10.0.2 to 12.0.2. The assembly binding redirect appears into my web.config file, which is expected:

  <runtime xmlns="">
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <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>
    </assemblyBinding>
  </runtime>

The problem why doesn't work the binding redirect was that namespace in my tag into my web.config:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

I deleted the namespace xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0" from tag and the assembly binding redirect is working now.

This post was helped me: https://stackoverflow.com/questions/1751775/binding-redirect-problem-in-net/12011221#12011221

Thanks for all of you to try to helping me

Metadata

Metadata

Assignees

Labels

needs more infoThis issue needs more information from the customer to proceed.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions