graphql-dotnet / graphql-dotnet/graphql-client

When installing in Unity LTS there are Newtonsoft.json conflicts

Open
#484 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
648
Forks
136
PR merge metrics
No merged PRs in 30d

Description

Installing through nuget for unity, latest version of graphql-client, we get
```
precompiled assemblies with the same name Newtonsoft.Json.dll included on the current platform. Only one assembly with the same name is allowed per platform.
/Library/PackageCache/com.unity.nuget.newtonsoft-json@3.0.2/Runtime/Newtonsoft.Json.dll
```

When I try removing either of these .dlls, it barfs, saying
```
TypeLoadException: Invalid type GraphQL.Client.Http.GraphQLHttpClient for instance field DataSubscriptionManager+d__3:5__2
(wrapper write-barrier) System.Object.wbarrier_conc(intptr)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1fe4b731108247d3a7e57fad336611b9>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
```

How can I redirect graphql-client to use the internal version of newtonsoft.json?

This is using Unity 2021.3.6f1 and the latest graphql-client

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.