Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
        JesseNinjaTrader Customer Service

        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 stafe, 04-15-2024, 08:34 PM
          5 responses
          28 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by StrongLikeBull, Yesterday, 04:05 PM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by Mestor, 03-10-2023, 01:50 AM
          14 responses
          375 views
          0 likes
          Last Post z.franck  
          Started by molecool, 10-09-2017, 10:48 AM
          5 responses
          1,621 views
          0 likes
          Last Post trader-ap  
          Started by The_Sec, Yesterday, 03:53 PM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X