Nethereum icon indicating copy to clipboard operation
Nethereum copied to clipboard

Can't use unity yield requests, The type 'JsonSerializerSettings' is defined in an assembly that is not referenced. You must add a reference to assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral,

Open sagivmis opened this issue 2 years ago • 5 comments

Issue tracker is ONLY used for reporting bugs. New features, questions and support should be discussed on our discord channel first. Discord

Expected Behavior

Set and send request to ethereum blockchain

Current Behavior

Code doesn't compile

Possible Solution

Probably something to do with newtonsoft's dep in the project

Steps to Reproduce

image

  1. Simply import files
  2. extract in project
  3. tr to use the requests

Context (Environment)

Trying to read and write to the blockchain

Detailed Description

The error message i get is: Error CS0012 The type 'JsonSerializerSettings' is defined in an assembly that is not referenced. You must add a reference to assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, (....)'. Assembly-CSharp

Possible Implementation

sagivmis avatar Jun 04 '22 19:06 sagivmis

You either include the Json.Net included and disable assembly check or you use the Unity one.

juanfranblanco avatar Jun 18 '22 09:06 juanfranblanco

having the same issue. could anyone explain the solution???

Screenshot 2022-12-02 at 12 38 02

errors shown here... (btw the biginteger errors are cause by the json error)

quimodotcom avatar Dec 02 '22 12:12 quimodotcom

You are using an old version of unity, can you upgrade it or do you need this version. Unity included json.net afterwards you can use this version directly or add a reference yourself https://github.com/Nethereum/Nethereum/tree/master/lib/com.unity.nuget.newtonsoft-json

juanfranblanco avatar Dec 02 '22 12:12 juanfranblanco

updated to unity 2020.3.42f1 and error are gone but assembly errors are here. p.s assembly errors were there in unity 2018 and 2017 aswell. Screenshot 2022-12-02 at 16 12 31

quimodotcom avatar Dec 02 '22 16:12 quimodotcom

Please use the https://github.com/Nethereum/Unity3dSampleTemplate as reference

juanfranblanco avatar Dec 02 '22 16:12 juanfranblanco