Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to import Newtonsoft.Json.Dll

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to import Newtonsoft.Json.Dll

    Hello

    I am trying to use Newtonsoft.Json.Dll but I have errors when trying to compile, such as

    Code:
    "Le type 'System.Object' est défini dans un assembly qui n’est pas référencé. Vous devez ajouter une référence à l’assembly ' System.Runtime, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a'."
    Do you think I can use Newtonsoft Dll in a NT8 project ?

    Thanks

    #2
    I have resolved my issue.

    I had imported the DLL from a Visual Studio 2017 Project => That seems to have been the cause of the issue.

    I downloaded the zipped binary from Newtonsoft and imported the dll from the uncompressed zip file downloaded and everything seems ok now

    Comment


      #3
      Well... Another problem now

      Everything compiles fine but when attaching the strategy to an instrument I have the following message :

      Strategy 'xxxStrategy': Error on calling 'OnStateChange' method: Impossible de charger le fichier ou l'assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' ou une de ses dépendances. Le fichier spécifié est introuvable.

      Comment


        #4
        Hello,

        Thank you for the post.

        You are able to use outside references with the platform, but you would also need to ensure that it is installed properly and is the correct version for the platform. Using third-party references is generally outside of the scope in which we can provide support for but I can provide the following items which may help you in loading the file successfully.

        The dll needs to be placed in the folder: Documents\NinjaTrader 8\bin\Custom

        Any other files that come with the dll, such as other dlls would also need to be placed in the folder with the dll.

        The version of the dll would need to be .net 4.5 or less and would need to be either AnyCPU or for the version you are using I.E. X64bit.

        if it was somewhere else you may also need to restart the platform after adding the dll to the bin/custom folder to ensure it is reloaded.

        Could you check these items and see if any of these relate to the error?

        I look forward to being of further assistance.

        Comment


          #5
          Thank you for your reply.

          I'll make other tests and will let you know if I still have errors.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          54 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          130 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          72 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          44 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X