[C#] How to add Newtonsoft.JSON

Hey, I want to use Newtonsoft.JSON but idk how to add it to my project, I have downloaded it via NuGet in different Versions, added the Package File to my fxmanifest, downloaded a file from the Forum, could someone explain me step by step what I have to do?
Thank you :slight_smile:

[    707203] [FiveM_b2944_GT]             MainThrd/ Could not load assembly Newtonsoft.Json - loading exceptions: Exception loading assembly Newtonsoft.Json: System.IO.FileNotFoundException: Unable to find the specified file.

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager+DirectScriptHost.OpenHostFileInternal (System.String fileName) [0x00011] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:726 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager+DirectScriptHost.OpenHostFile (System.String fileName) [0x00000] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:712 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager.LoadAssemblyInternal (System.String baseName, System.Boolean useSearchPaths) [0x00075] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:212 

[    707203] [FiveM_b2944_GT]             MainThrd/ Exception loading assembly Client/bin/Release/Newtonsoft.Json: System.IO.FileNotFoundException: Unable to find the specified file.

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager+DirectScriptHost.OpenHostFileInternal (System.String fileName) [0x00011] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:726 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager+DirectScriptHost.OpenHostFile (System.String fileName) [0x00000] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:712 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager.LoadAssemblyInternal (System.String baseName, System.Boolean useSearchPaths) [0x00075] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:212 

[    707203] [FiveM_b2944_GT]             MainThrd/ 
[    707203] [FiveM_b2944_GT]             MainThrd/ Could not load assembly Newtonsoft.Json - loading exceptions: Exception loading assembly Newtonsoft.Json: System.IO.FileNotFoundException: Unable to find the specified file.

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager+DirectScriptHost.OpenHostFileInternal (System.String fileName) [0x00011] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:726 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager+DirectScriptHost.OpenHostFile (System.String fileName) [0x00000] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:712 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager.LoadAssemblyInternal (System.String baseName, System.Boolean useSearchPaths) [0x00075] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:212 

[    707203] [FiveM_b2944_GT]             MainThrd/ Exception loading assembly Client/bin/Release/Newtonsoft.Json: System.IO.FileNotFoundException: Unable to find the specified file.

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager+DirectScriptHost.OpenHostFileInternal (System.String fileName) [0x00011] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:726 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager+DirectScriptHost.OpenHostFile (System.String fileName) [0x00000] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:712 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.InternalManager.LoadAssemblyInternal (System.String baseName, System.Boolean useSearchPaths) [0x00075] in C:\gl\builds\master\fivem\code\client\clrcore\InternalManager.cs:212 

[    707203] [FiveM_b2944_GT]             MainThrd/ 
[    707203] [FiveM_b2944_GT]             MainThrd/ Error invoking callback for event loadInventory:Client: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException: Error verifying Client.Inventory:loadInventory (object): Cannot load method from token 0x0a000015 for call at 0x001b

[    707203] [FiveM_b2944_GT]             MainThrd/   at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/    --- End of inner exception stack trace ---

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/   at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <b575c7ac070e41ffa0751333b6ac9f42>:0 

[    707203] [FiveM_b2944_GT]             MainThrd/   at CitizenFX.Core.EventHandlerEntry+<Invoke>d__5.MoveNext () [0x00064] in C:\gl\builds\master\fivem\code\client\clrcore\EventHandlerDictionary.cs:107