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 gravdigaz6, Today, 11:40 PM
          0 responses
          0 views
          0 likes
          Last Post gravdigaz6  
          Started by MarianApalaghiei, Today, 10:49 PM
          3 responses
          9 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by XXtrader, Today, 11:30 PM
          0 responses
          3 views
          0 likes
          Last Post XXtrader  
          Started by love2code2trade, Yesterday, 01:45 PM
          4 responses
          28 views
          0 likes
          Last Post love2code2trade  
          Started by funk10101, Today, 09:43 PM
          0 responses
          9 views
          0 likes
          Last Post funk10101  
          Working...
          X